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

  Creating code for method tostring

Fill in the code for method toString, which must return a string containing the name, account number, and balance for the account.

  Create method to generate random integers

Create a method named posNeg which generates 1000 random integers. Range of numbers must be from -5 to +5 inclusive.

  Write a paper on memory management

Write a paper on Memory Management

  Input number by user and display positive and negative

Input a number entered by the user and display "positive" if it is greater than zero, "negative" if it is less than zero, and "zero" if it is equal to zero.

  Building instruction set simulators

Building Instruction Set Simulators

  What is the throughput of the system

what is the throughput of the system

  Two-dimensional array to store weekly hours for employees

Assume the weekly hours for all employees are stored in two-dimensional array. Each row records emaployee's seven-day workhours with seven columns.

  Program to compute perimeter and area of rectangle

Write a program that asks for length L and the width W of a rectangle, then compute perimeter and area of the rectangle.

  Write program that merges two files

The first programming project involves writing a program that merges two files that contain polynomials. To merge two files, the input files must be in sorted order.

  Reservations system to be horizontal or vertical application

Top Sail Realty Situation: Top Sail Realty is one of the largest time-sharing and rental brokers for vacation cottages. Do you consider the reservations system to be a horizontal or a vertical application? Give reasons for your answer.

  Script that displays the results of rolling a die n times

The example in the links below shows a script that displays the results of rolling a die n times. It retains (in memory) and can display the results of all rolls. The two links below are the html and js files for this example.

  Write program to test every entry of table is saddle point

Saddle point is entry in a table which is a minimum for its row and maximum for its column. Write a program which will test every entry of table to see whether it is saddle point.

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