Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need help writing this program in c++ Parti: The transcontinental company you are working for has developed its services, and it is going to ship

need help writing this program in c++ image text in transcribed
image text in transcribed
Parti: The transcontinental company you are working for has developed its services, and it is going to ship crates across oceans to all five other continents. The price of cargo ship space to each destination continent is different. Table I illustrates the different prices per cubic foot. Therefore, the company needs a menu to choose a specific destination continent. You should use the iomanip library to make the menu alignment. 1- The first line of the menu prompts the user to select an individual continent, and it has six options, as follows: Please select the destination continent: Africa (Aflat) Asia (As/as) Australia (Au/au) Europe (Eu/eu) The Americas (Am/am) Quit (Q/q) 2- Once the menu shows up, the user selects an option, and the program assigns the chosen option to a string variable and checks whether it is valid or not. If the user enters a valid value, output the destination continent's name plus a welcome message. For example, suppose the destination continent is Asia. In that case, the user should enter "As" or "as" (both capital and small form of the first letter is acceptable), and the program should output "Welcome to Asia cargo shipping program. Please check out example 2 at the end of the assignment. 3. If the user enters Q or q, output a thank you message and quit your program. Please check out example 3. 4. If the user enters wrong values that are not available on the menu, output an error message and quit your program. Please check out example I. 5. You will add some functionality to the program to help quote prices to customers. As it is mentioned, a transportation to each continent has a different cost. You can find the minCost, medCost, and the maxCost for each destination continent in the following table. There are three values in the table named minCost (crates with volume less than 40 ft), medCost (crates with volume more than 40 ft and less than 80 ft), and maxCost (crates with volume more than 80 ft). The costs are per cubic foot. Table 1: crates prices per cubic foot to different continents Continent minCost medCost maxCost Africa, Asia $4.0 $5.5 S8 Australia, Europe S7.8 $5.7 SIO The Americas $2.5 $3.5 S6 6- Declare three double variables called maxCost, medCost and minCost in your program, and use the above table and the user selected option from the menu to assign correct values to them. Part 2: 1- Once the destination continent is selected, your program prompts and asks the user how many crates should be sent? Then this number will be assigned to an integer variable called iteration Num. If the entered value for the number of crates is not an integer, use a loop here to keep asking the user to enter a correct value. 2- The company has 10 cargo ships overall, and because of this limitation there is a goal to maximize the number of crates being sent by each cargo ship. So, the company designed some standard crates sizes. There are three types of crates (a, b, and e) with the following properties. The only data needed from the Table 2 is the volume column. You need three global constants to use the Volume size of the different crates' type in your program. a volume = 24.0 // the volume size of the crates type a b_volume = 125.0 // the volume size of the crates type b c volume = 30.0 // the volume size of the crates type c Table 2: Different crates' type. Type Length Width Height Diagonal GS 2.0 5.0 3.0 3.0 5.0 4.0 5.0 2.0 Volume Surface Area 24.0 (ft) 52.0 (ft) 125.0 (ft) 150.0 (A) 30.0 (ft) 62.0 (11) 5.4 8.7 6.2 C 3.0

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

Database And Transaction Processing

Authors: Philip M. Lewis, Arthur Bernstein, Michael Kifer

1st Edition

0201708728, 978-0201708721

More Books

Students also viewed these Databases questions

Question

1. Identify what positions are included in the plan.

Answered: 1 week ago

Question

2. Identify the employees who are included in the plan.

Answered: 1 week ago

Question

7. Discuss the implications of a skill-based pay plan for training.

Answered: 1 week ago