Introduction

You have been assigned to create an application with a graphical user interface (GUI) for an Auto Care Center company. After few meetings with the customer (the auto care company), a set of functional requirements have been developed. These requirements are described in Section 2. Your task is three fold:

  • Develop such program based on those functional requirements.
  • Create a written procedure of how to test your code to check the correctness implementation of your code. For each test you come up with, please put what is the input and output results.
  • Run the test cases and document results.

Please follow example Brandis Bagel House project fully explained in your textbook. I want you to create individual classes that EXTENDS JPanel class, for the Customer, Customer Information, Week Specials, and Other Services. Then add those panels into your main JFrame.

Functional Requirements

Functional Requirement 1

The deliverable program shall have the Graphical User Interface as seen in Figure 2.1. Please pay attention in all details such as:

  • Background Colors
  • Font size and type (bold and italic in few places)
  • GUI components Layout

(Your grade will also be based on how close your program looks like the GUI shown in Figure 2.1, so work hard to get it as close as you can) See image.

Functional Requirement 2

For the Customer, if this is a new customer, apply 10% discount on the final invoice value. For old customers, apply 5%.

Functional Requirement 3

For the Week Specials, for each service checked, the service total cost will be increase by a certain value, as specified in the Table 1.

Table 1 Service type versus Service Cost

Item Number Service Type Service Cost
1 Brakes $30.30
2 Tire Rotation $20.20
3 Fluid Check $10.10
4 Car Wash $5.05
5 Annual Emission Inspection $40.40

Functional Requirement 4

For the Other Services, the following sub-requirements are specified.

Functional Requirement 4.1

The Drop-down box shall be disabled when its associate Check box has not been checked. For example, if the Tire Replacement check box has not been selected, then the drop-down box for selecting the tire type shall be disabled.

As the Tire Replacement check box has been selected, its associate drop-down box shall be immediately enabled for tire selection.

Functional Requirement 4.2

The same functionality specified in Functional Requirement 4.1 shall be implemented for the Oil Change.

Functional Requirement 4.3

The prices shown on Table 2 shall be used for the Other Services when service has been selected.

Table 2 Service type versus Service Cost

Item Number Service Type Service Cost
1 Regular Tires $250.25
2 Premium Tires $350.35
3 Regular Oil $15.15
4 Synthetic Oil $27.27

Functional Requirement 5

For the Service Cost, for any entry that impacts on the total service cost, e.g., any entry in the customer, week specials, and other services, the value of the invoice shall be automatically and immediately updated. The cost value shall include the 6% local tax.

Functional Requirement 6

If the Reset button is pressed, all inputs of this GUI shall be cleared out. The only exception is for the Customer group: the New Customer shall be selected as the default entry.

Functional Requirement 7

If the Print Invoice button is pressed, a new window (frame) shall be displayed (Please pay attention, I do not want a JOptionPane here!!!). The layout of this window has been left to our discretion, i.e., there is no specific format, but the functionality described in the next sub-requirements shall be implemented.

Functional Requirement 7.1

This window shall show a summary of the customer order containing:

  • Customer information
  • Services required along with their prices (from both Week Specials and Other Services)
  • Sub-total price
  • Taxes over the sub-total price
  • Total price
  • Current date and time of this invoice

Functional Requirement 7.2

This window shall have two buttons located at its bottom portion: Print and Cancel buttons.

Functional Requirement 7.2.1

The Print button shall write the shown invoice into the following text file: fileName.txt. The fileName shall be the customer name with underscores between the words composing his/her name.

Example: If the customer name is John Brasko Smith , the output text file shall be john_brasko_smith.txt.

After writing the file, a JOptionPane shall be used to confirm that the invoice has been printed. After the user provides acknowledge of it (by pressing the OK button of this JOptionPane dialog box), the window described in Functional Requirement 7 shall be closed and the GUI shall be the only window open on the screen.

Functional Requirement 7.2.2

The Cancel button closes this window and the GUI shall be the only window open on the screen.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.