Question: 1. A Write a program that can be used by a pizza shop to determine the cost of an order. The regular price for a

1. A Write a program that can be used by a pizza shop to determine the cost of an order. The regular price for a pizza is $10 each. If a customer orders more than 3 pizzas, the shop will give the user a 10% discount on their entire order (i.e., 10% off the price of each pizza). If they order 3 or less pizzas, there is no discount. Write a program that requests the user to enter the total number of pizzas they want to order and then calculate the total cost of the order and print the results. Test the program with two sets of data that show both outcomes and include the results in this report. Do not concern yourself with controlling the display of the decimal point.

Sample Output

Enter the number of pizzas: 5

Cost before discount: $ 50.0

Total Discount: $ 5.0

Total Cost: $ 45.0

Enter the number of pizzas: 2

Cost before discount: $ 20.0

Discount: $ 0.0

Total Cost: $ 20.0

Program:

Output (2 different outputs/tests):

1.B.

Write a program that translates a number code description for different Faculties at Dalhousie to their longer equivalency. The codes are: 1 for Computer Science, 2 for Engineering, 3 for Medicine, 4 for Management, and 5 for Arts. The program will prompt the user to input a number and then print the name of the Faculty or a message Invalid input". Test the program with six sets of data and include the results in this report to show all possible outcomes.

Some sample runs:

Please input the Faculty code: 1

You have chosen Computer Science

Please input the Faculty code: 3

You have chosen Medicine

Please input the Faculty code: 6

Invalid input.

Program:

Output (6 different outputs/tests that show all cases):

Make sure it is done in Java format.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!