Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

coded in java 1. The input/data needed (INPUT) 2. Computation or processing to be performed on the data to get the desired result (PROCESSING) 3.

coded in java
image text in transcribed
1. The input/data needed (INPUT) 2. Computation or processing to be performed on the data to get the desired result (PROCESSING) 3. presenting or storing the output as desired by the user (OUTPUT) So let's reflect on our Tom's Trucking problem. Algorithm 1: Number of Trucks for the day: Bach day Tom has at least two trucks... 1. Ask Tom how many trucks he has today 2. Check if the number Tom gave is two or more 3. If the number is two or more, store this data. If the number is less than two, notify Toe and go back to step 1: As you can see in Algorithm I, we have the input needed identified the process (checking if the number meets the expectation) and storing. We also have an additional action if the number does not meet the expectation, that is to notify Tom and go back to Step 1. Clearly if we go back to step 1, then we will also redo sep 2 and step 3. So our algorithm has precise steps and ordering Algorithm 2: Size (Max Capacity of cach Trucks: The trucks are either large trucks or small trucks 1. Get the number of tracks for the day 2. Set the track of interest to the first truck 3. Ask Tom what should be the size of this truck, large or small 4. Set the maximum capacity of this truck based on Tom's response 5. Move to the next track and make this the new truck of interest 6. If the truck of interest is the last track end the algorithm. If it is not the last truck then go to step 3 Algorithm 3: Actual Lad of each Trucks What would be you algorithm for getting and storing the actual umber of crates in each truck? Remember to check on any special conditions that may apply 1. The input/data needed (INPUT) 2. Computation or processing to be performed on the data to get the desired result (PROCESSING) 3. presenting or storing the output as desired by the user (OUTPUT) So let's reflect on our Tom's Trucking problem. Algorithm 1: Number of Trucks for the day: Bach day Tom has at least two trucks... 1. Ask Tom how many trucks he has today 2. Check if the number Tom gave is two or more 3. If the number is two or more, store this data. If the number is less than two, notify Toe and go back to step 1: As you can see in Algorithm I, we have the input needed identified the process (checking if the number meets the expectation) and storing. We also have an additional action if the number does not meet the expectation, that is to notify Tom and go back to Step 1. Clearly if we go back to step 1, then we will also redo sep 2 and step 3. So our algorithm has precise steps and ordering Algorithm 2: Size (Max Capacity of cach Trucks: The trucks are either large trucks or small trucks 1. Get the number of tracks for the day 2. Set the track of interest to the first truck 3. Ask Tom what should be the size of this truck, large or small 4. Set the maximum capacity of this truck based on Tom's response 5. Move to the next track and make this the new truck of interest 6. If the truck of interest is the last track end the algorithm. If it is not the last truck then go to step 3 Algorithm 3: Actual Lad of each Trucks What would be you algorithm for getting and storing the actual umber of crates in each truck? Remember to check on any special conditions that may apply

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions

Question

1. Which position would you take?

Answered: 1 week ago

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago