Question: USE A do-while loop Code a Java program that displays the registration information for programming seminars. The price per person depends on the number of

USE A do-while loop

Code a Java program that displays the registration information for programming seminars. The price per person depends on the number of people a company registers. For example, if a company registers four people, the amount owed is 4 * $100 or $400. The following table shows the charge per registrant based on the number registered:

Number of registrants

Charge per person ($)

1 3

$150

4 9

$100

10 or more

$90

The program should allow the user to enter registration for any number of companies. Use a do-while loop to process the first company, then prompt the user whether to continue or not. When done, also display the total number of companies registered, total number of people registered, the total charges, and the average charge per registrant.

Sample output (Test case 1)

Enter company name: Xerox

How many registrants? 4

INVOICE

Company: Xerox

Cost per registrant: 100.00

Total for 4 people is $400.00

Another registration? (Y/N) y

Enter company name: Cisco

How many registrants? 2

INVOICE

Company: Cisco

Cost per registrant: 150.00

Total for 2 people is $300.00

Another registration? (Y/N) n

REGISTRATION SUMMARY

Number of companies registered: 2

Total number of people registered: 6

Total charges: $700.00

Average charge per person: $116.67

Coded by yourname

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!