Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Write a Java program to assist the sales manager to review quotation detail. The GUI program works as follow. Upon start up, only the

image text in transcribed imageimageimageimageimage

Write a Java program to assist the sales manager to review quotation detail. The GUI program works as follow. Upon start up, only the Load button is enabled to allow user to load the quotation items from a text file. (Please refer to lab 5 for the detail on the QuotationItem class and reading text file.) Quotation Management Code Quantity Price Discount Total Load Prev Next When the user clicks the Load button, the program will attempt to read the items from the text file into an ArrayList. If the items cannot be read for whatever reason, the program must inform the user accordingly. Below is an example. Quotation Management Code Quantity Message i No quotation record Price Discount Total OK Load Prev Next Once the items are read into the program (into an ArrayList), the first item will be displayed, and the buttons will be enabled and disabled accordingly. In the example below, the Load button is disabled to prevent repeated data loading. The Prev button is disabled because there is no item before the first item. Code Quotation Management p1 - Quantity Price 10 50.5 Discount 0.0 Total 505.0 Load Prev Next The user can browse the items with Prev and Next buttons. Quotation Management - Code Quantity Price p2 50 70.5 Discount 0.1 Total 3172.5 Load Prev Next When the last item is reached, the Next button will be disabled. Code Quotation Management p4 - Quantity Price 30 10.0 Discount 0.05 Total 285.0 Load Prev Next The program will terminate when the use clicks on the close (X) button at the top, right hand corner. Program Structure Your program will have 3 classes (or more depending on your design) as follow. QuotationItem class Please refer to lab 5 for the detail on the class and the data file. QuotationApp class This class will extend the JFrame class to provide the GUI for the program. It will make use of the ArrayList and the QuotationItem class to read, store and display the items. TX YY A3 class This class has a main method to create an instance of the QuotationApp class and set the GUI program in motion. Source code comments Please include appropriate header and block comments in the program. Submission class QuotationItem code quantity Instance variables price Constructor discount You may declare additional variable(s) as you deem fit. The constructor will receive 4 parameters and initialize the instance variables accordingly. Get/set methods Please include necessary get and set methods. Instance method Instance method getTotal Parameters: None Returns: quantity * price * discount. toString Parameters: None Returns: A descriptive String p1,10,50.5,0 p2,50,70.5,0.1 p3,10,0,0 p4,30,10.0,0.05

Step by Step Solution

3.30 Rating (165 Votes )

There are 3 Steps involved in it

Step: 1

Here is your answer addproductjava To change this license header choose License Headers in Project Properties To change this template file choose Tools Templates and open the template in the editor pa... blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Java Concepts Late Objects

Authors: Cay S. Horstmann

3rd Edition

1119186714, 978-1119186717

More Books

Students explore these related Programming questions