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

  Program to determines and print all prime numbers

Use this function in program which determines and prints all prime numbers between 2 and 10,000. How many of these numbers do you actually have to test before being sure that you have found all primes?

  Explaining the situation in program

Which of the following best explains the situation after Line 1 has been executed?

  Create classes essential to create service quote

Create classes essential to create service quote. Write the application program which will use classes to create the objects and output the service quote.

  Create a program that uses the same formula

Create a program that uses the same formula above to output the result; this time, however, prompt the user for the values a, b, x, and y.

  Write non-recursive to perform algorithm

Write a non-recursive (i.e., iterative) function selectionSort() to perform this algorithm. Use it in a program that reads from a file a sequence of integers.

  Program to calculate and displays number of miles per hour

Design a program to calculate and displays the number of miles per hour over the speed limit that a speeding driver was doing

  Write program to find smallest-largest value from n numbers

Write down program which will determine the smallest, largest and average values in collection of N numbers. Get value of N before scanning each value in collection of N numbers.

  Advantages of using invisible html table to create web page

What advantages do you see in using an invisible HTML table to structure an entire Web page? What disadvantages does the table structure pose?

  Function to calculate recurrence using dynamic programming

Write down a function to calculate the following recurrence by using dynamic programming. PN = PN-1 + 2PN-2, with P1 = P0 = 1.

  Write program for real estate agent

Write a program for a real estate agent. The program should perform the following tasks: ask users for the average house price for the each of past 5 years for a single family residence of 1500 square feet.

  Php code to add-delete product using ajax programming

PHP Code to add a new product and delete a existing product Implement AJAX Programming based solutions to write code to add a new product to the database.

  Design a class-based solution to a problem

To design a class-based solution to a problem using multiple data structures.

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