Code the next version of the cp1200 catering calculator

Assignment Help Programming Languages
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.

Reference no: EM13190970

Questions Cloud

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

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd