Reference no: EM13190970
Task:
You are to plan and then code the next version of the CP1200 catering calculator, as described in the following information and sample output below. This assignment has two parts, each of which is the whole program, but the second is a version using object oriented programming.
Program Features:
The program is similar to assignment 1, but with added features. Ensure that your program has the following features, as demonstrated in the sample output below:
• Instead of choosing basic or premium, the user will choose from various catering packages, which are stored in memory and can be saved to and loaded from a text file called packages.txt.
• The user can add new packages to program memory. They will be prompted for the package name, price per adult and price per child, which are all error-checked. Adding a package does not save it to the packages file unless the user chooses to save.
• Saving replaces everything in the file with whatever packages are in memory.
• Loading a new file replaces any packages already in memory (whether added or loaded).
• For the catering calculations, the user enters the number of adults and children and then chooses a catering package and a delivery option.
• There is a 1 in 10 random chance of getting adults at children's prices no matter what catering package is chosen.
• Error checking in this version is more comprehensive and your program should not crash for any input. Integer and float inputs must be checked for valid numbers. Refer to the sample output to see specific examples of limitations on the values for various inputs, e.g. the package choice has to be a valid package number, and prices must not be <= 0.
• The package name must fit within 16 characters, and when packages are displayed, they should line up in this width.
An example file (as used for the sample output below) is provided for you on LearnJCU and you must use this format. Each line contains a package name, price for adults and price for children separated by commas (no spaces) and a single new line character. You can assume that the packages.txt file exists and its contents are valid, so you do not need to do any error checking for the file.
Find the work required to pump the water out
: A tank is full of wter. Find the work required to pump the water out of the outlet. Use the facts that water weighs 62.5 lb/ft3 and R=9ft. Round the answer to the nearest integer.
|
State a mix of p-methylstyrene and p-methoxystyrene
: A mix of p-methylstyrene, p-methoxystyrene and p-cresol is run using colmn chromatography.
|
Compute the final temperature of the gas
: At the end of the process, the pressure is 2.50x10 to the 6 Pa. Calculate the final temperature of the gas. Calculate q, w, deltaU, and deltaH for this process.
|
Find the radius of the orbit of the orange star
: One of the best candidates for a black hole is found in the binary system called A0620-0090. The two objects in the binary system are an orange star, V616 Monocerotis, and a compact object believed to be a black hole.
|
Code the next version of the cp1200 catering calculator
: You are to plan and then code the next version of the CP1200 catering calculator, as described in the following information and sample output
|
Which would have a larger overall impact on ad
: Which of the following changes to fiscal stimulus package of 2009 for $862 billion (under the bill called American Recovery and Reinvestment Act of 2009) would have a larger overall impact on AD Explain your answer in a paragraph or two with credi..
|
State how to break glass bottles where you soak yarn
: how to break glass bottles where you soak yarn in acetone, tie it around the bottle, light it on fire for 20-30 seconds then submerge it in water and the glass seperates.
|
How many miles per hour was the car traveling
: At the scene of an accident, police measured a skid mark of 361 feet. About how many miles per hour was the car traveling when the brakes were applied?
|
Find the slope of the tangent line to the curve
: Find the slope of the tangent line to the curve
|