Reference no: EM1347162
Q1) You are a consultant for an IT consulting firm. You need a program that will calculate the invoice for a client and then print out an invoice to the screen. The consulting rate is $200 per hour.
Your Java program should have the following options:
1. Add Client
2. Create Invoice
3. Quit
If the first option is selected the consultant will enter the clients name, id #, address and number of hours worked.
If the second option is selected the consultant will be asked for a client's ID #. If the client exists then an invoice will be displayed to the screen that shows the client's Id#, address, name, the number of hours worked, the consulting rate, and the total amount of the bill. Also, include a tax rate of 8%. If the client does not exist then display a message to the screen telling the consultant that the client must be added before an invoice can be created for the client.
The consultant should be able to add multiple clients and create multiple invoices before quitting the program.
You will need a client class and an invoice class. Identify the attributes needed for the client class and the invoice class. You will need accessor, mutator methods, and constructors. Your invoice class will need to calculate the total price for the hours worked, the amount of tax owed, and return the total for your invoice.
Design UML class diagram for client and invoice classes, design the code in Java for your client and invoice classes, and draw the program that consultant will use to add a client and create an invoice.