taskyou are to plan and then code the next


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.

Request for Solution File

Ask an Expert for Answer!!
Application Programming: taskyou are to plan and then code the next
Reference No:- TGS0501548

Expected delivery within 24 Hours