3 Java Applications in Business

profileshanta75
MISY_3433_ProjectSpring20216.pdf

MISY 3433 Java Applications in Business – Spring 2021

Individual Term Project

The project has two parts

• Part 1: Design (50 points) – Due March 26, 2021 • Part 2: Implementation (150 points) – Due March 30, 2021

Your grade in the project is dependent upon the following:

1. Clear and adequate analysis; 2. Clear and adequate flowchart; 3. Programs compiling; 4. Programs performing the tasks as indicated in the problem statement; 5. Programs clarity (following naming convention for classes and variables, providing

code comments and indentations);

PROBLEM DESCRIPTION

A customer needs to buy a specific quantity of cakes. The price of a cake varies depending on the number of cakes in the packet. The price is as follow:

• $1.50 for a single cake

• $1.25 per cake in a packet of 25

• $1.10 per cake in a packet of 100. If the quantity of cakes bought is greater than 400, there is a rebate of $2 for each

packet of 100.

PART 1 : Design Develop a solution (analysis and flowchart) to compute and print:

• The type and number of packets given the quantity of cakes bought by a customer;

• The cost of the cakes;

• The rebate;

• The bill to be paid by the customer.

PART 2 : Implementation

Write a program to compute and print:

• The type and number of packets given the quantity of cakes bought by a customer;

• The cost of the cakes;

• The rebate;

• The bill to be paid by the customer.

The program will prompt the user to enter the quantity of cakes to buy.

TESTING THE PROGRAM

Test your program with the following data:

Input Expected result

Quantity of cakes

Type of Package Cost Rebate Bill

Single Pack of 25 Pack 100

10 10 0 0 $15 $0 $15

77 2 3 0 $96.75 $0 $96.75

300 0 0 3 $330 $0 $330

552 2 2 5 $615.5 $10 $605.5

Here is one example of program output:

Enter the number of cakes to purchase: 552

Number of Single Cakes : 2 Number of packets of 25 Cakes : 2 Number of packets of 100 Cakes : 5 Cakes Cost : $615.5 Rebate : $10.0 Cakes Bill : $605.5