Question: ?????? help please Selection Structures Part 1: Understand the problem. A new shipping company wants a program that calculates cargo shipping via transport truck, freight


?????? help please Selection Structures Part 1: Understand the problem. A new shipping company wants a program that calculates cargo shipping via transport truck, freight train, air plane. Each shipping mode has a different cost modifier that is multiplied against the weight of the parcel in kilograms. There is also a base service charge. Modifiers are transport truck (0.10), train (0.25), air cargo (0.75) and a common service charge of 10 dollars. Write a program that asks the user for the weight of the cargo in kilograms, as well as what shipping method they want to use. Output the selected shipping method, and the final cost rounded up to the nearest whole dollar amount. Write out an equation to calculate the cost for each shipping method, based on the work problem above. You may use Math.ceil(double) to round up to the whole dollar amount. Document your math in your MS Word document for your submission For this exercise, distance was omitted on purpose to simplify the exercise, you only need weight and shipping mode. . . cise 6 (216) mode. . . Part 2: Pseudocode, Flowchart Plan and document an algorithm for the problem statement above using pseudocode and a flowchart. You may complete this entire program within one main method, or you may use an object-oriented approach, the focus of this exercise is using a selection structure. Ask the user for the weight of the cargo, in kilograms. As the user for the shipping mode they intend to use. Use either a switch or if statement to decide what shipping mode to process, based on user input. E.g. if the user enters 1, use transport truck, if they enter 2, use freight train, if they enter 3 use air cargo, if they enter a menu option that is not 1, 2, or, 3 print an error message instead of performing any calculation at all. You should use constants, rather than magic numbers like 1, 2 or 3. Document your pseudocode and flowchart in your MS Word document for your submission (Refer to the Week 9 lecture notes and code examples, which show how to create a simple menu system). (See the appendix in this handout for examples of how the completed program will run.) Part 3: Testing Algorithm Test your algorithm with a weight in kilograms (up to you, keep it simple e.g. 10.0). Create a separate test of each menu option, including an invalid menu option Document your test plan using a table in your MS Word document Part 4: Java Program Follow Java coding conventions. . . . Document your pseudocode and Howchart in your MS Word document for your submission (Refer to the Week 9 lecture notes and code examples, which show how to create a simple menu system). (See the appendix in this handout for examples of how the completed program will run.) . . . Part 3: Testing Algorithm Test your algorithm with a weight in kilograms (up to you, keep it simple e.g. 10.0). Create a separate test of each menu option, including an invalid menu option. Document your test plan using a table in your MS Word document Part 4: Java Program Follow Java coding conventions. Translate your algorithm, as defined in part 2 above, into a Java program. Output your full name on screen as the program exits. Take screen shots of four program runs, three using each of the shipping methods, and one with an invalid shipping method input . . . Part 5: Test your Java Program Use a separate table to test your Java program What happens when you input text, or a negative number for the kilograms? Document your test plan using a table in your MS Word document. . . Use a separate table to test your Java program What happens when you input text, or a negative number for the kilograms? Document your test plan using a table in your MS Word document. Microsoft Word Document Format Suggested headings Part 1: Understand the problem. Part 2: Pseudocode, Flowchart Part 3: Testing Algorithm Part 3: Java Program (Screen Shots) Part 5: Test your Java Program Submission Requirements
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
