Chat with us, powered by LiveChat Focus On Software Engineering: Using Methods In A Menu-Driven Program | Writedemy

Focus On Software Engineering: Using Methods In A Menu-Driven Program

Focus On Software Engineering: Using Methods In A Menu-Driven Program

Focus on Software Engineering: Using Methods in a Menu-Driven Program

CONCEPT: Methods are ideal for use in menu-driven programs. When the user selects an item from a menu, the program can call the appropriate Method.

Write a menu-driven program for De Anza College Food Court. (You need to use Methods !)

  • Display the food menu to a user (Just show the 5 options’ names and prices – No need to show the Combos or the details!)
  • Use numbers for the options and for example “6” to exit.
  • Ask the user what he/she wants and how many of it. (Check the user inputs) AND use trim() function to trim your inputs(if needed)
  • Keep asking the user until he/she chooses the exit option.

You should have two classes, the first one is a driver class and the second one is the order class and includes these methods:

  • A method to display the menu                           => displayMenu()
  • A method to get inputs                                    => getInputs()
  • A method to calculate the tax and the bill              => calculate(…..)
  • A method to print the bill                                => printBill(….)
  • You can use quantity1,quantity2,quantity3,quantity4,quantity5 to save the quantities of the burgers and put them inside an array
  • You can use a constant array variable for the prices like priceArray = [5.25,5.75,5.95,5.95,5.95]
  • Don’t forget to test your code with Positive and Negative Testing!

(For more information see this page Software Testing )

  • Your code should have comments for each methods.
  • Submit your code here.

Note: You can use your own code design and naming methods. Better designs will get better grades.

Note: It is a good design if your main method is short and you call other methods from the main method. It means, it is better to use different methods instead of putting all your code in the main method.

  • Calculate the price.
  • Ask the user whether he/she is a student or a staff. There is no tax for students and 9% tax for staffs. Add the tax price to the total price.

TaxCupertino

9.000%

Santa Clara

  • Display the bill to the user. The bill includes:
  • The food items
  • The quantities
  • The cost of them
  • The total before tax
  • Tax amount
  • Total price after tax

You can have your own design but you need to have a main method and get started from the main method .

The name of methods also up to your design but the names should show what the methods do.

  • Only display 2 decimal points when displaying all the numbers.
  • Put at least two outputs  (results after you run your code) at the end of your code as a multi-line comment.
  • Don’t forget to put your name and a short description of your code on the top on your code.

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order