Write a Java program to assist the sales manager to review quotation detail. The GUI program...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 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
Expert Answer:
Answer rating: 100% (QA)
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... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
QUESTION 3 (a) (b) You are given two materials, X and as in Figure Q3(a). Investigate the type of material X and material Y and justify your answer. Then, compare the energy band between material X...
-
QUIZ... Let D be a poset and let f : D D be a monotone function. (i) Give the definition of the least pre-fixed point, fix (f), of f. Show that fix (f) is a fixed point of f. [5 marks] (ii) Show that...
-
Question B3 [2 points]. Examine, analytically and graphically in a diagramme drawn in the PD-z space, the effects of the increase in i*, and show that in the new equilibrium domestic prices can be...
-
Suppose you have a 9.00 V battery, a 2.00 F capacitor, and a 7.40 F capacitor. (a) Find the charge and energy stored if the capacitors are connected to the battery in series. (b) Do the same for a...
-
In a study to estimate the proportion of residents in a certain city and its suburbs who favor the construction of a nuclear power plant, it is found that 63 of 100 urban residents favor the...
-
Explain the assumptions of working of the reciprocating compressor. Discuss the working of a reciprocating compressor with a neat sketch.
-
Cindy Neuers regular hourly wage rate is $16, and she receives an hourly rate of $24 for work in excess of 40 hours. During a January pay period, Cindy works 47 hours. Cindys federal income tax...
-
Thomas and his wife Diana have operated their children's daycare for the last three years. They also own the daycare facility, a building, and the adjacent land on 1322 Glades Road. They have limited...
-
In the Chapter 11 Data Analytics Case, you used Tableau to examine a data set and create calculations to compare the relative age of two companies assets. In this case you continue in your role as an...
-
Which of the following is not true regarding accounting and financial reporting for non-governmental, not-for-profit organizations? A) Expenses are classified as unrestricted or temporarily...
-
Jeffrey and Yuqi put a 648-g empty iron kettle on a stove. How much heat, in joules, must it absorb to raise its temperature from 15.0'C to 37.0.C? (The specific heat for iron is 1 13 cal/kg . Co, I...
-
If the cost of equity capital is 15% p.a., the company tax rate is 30%, the cost of debt is 12% p.a. and gamma = 0.60, what is the cost of capital rounded to one decimal place if the funding is 50%...
-
Denis recently spent $ 1 2 8 0 on a new laptop for his home business. He read that the depreciation rate for this model laptop is 2 5 % per year. How much money should Denis expect to sell his laptop...
-
Explain The Role of the Endocrine System in Vertebrates
-
create a table to compare the scale, reasons, and potential legal settlements of incidents Marriott International (Nov 2018) Equifax (Jul 2017) Target (Dec 2013) Adobe (Oct 2013) Based on Rapid7 case
-
A new machine cost $700,000 and will be useful for 5 years. The machine will be depreciated to zero on a straight-line basis over its 5-year life. The new machine will generate annual revenue of...
-
A fast-food restaurant averages 150 customers per hour. The average processing time per customer is 90 seconds. a. Determine how many cash registers the restaurant should have if it wishes to...
-
Consider the following code segment. double purchase = 19.93; double payment = 20.00; double change = payment - purchase; System.out.println(change); The code segment prints the change as...
-
What does this program print? Pay close attention to spaces. public class Test { public static void main(String[] args) { System.out.print("Hello"); System.out.println("World"); } }
-
Write a program that reads four integers and prints two pairs if the input consists of two matching pairs (in some order) and not two pairs otherwise. For example, 1 2 2 1 two pairs 1 2 2 3 not two...
-
A single-tank liquid-level system with inflow rate \(q_{i}\) as its input and liquid level \(h\) as its output is modeled as \(R A \dot{h}+g h=R q_{i}(t), h(0)=0\), where \(R, A, g=\) const. If the...
-
Find the state vector via the formal-solution approach. \(\dot{\mathbf{x}}=\left[\begin{array}{cc}5 & 1 \\ -4 & 1\end{array} ight] \mathbf{x}+\left[\begin{array}{c}1 \\ -1\end{array} ight] u, \quad...
-
A dynamic system is modeled as \[4 \ddot{x}+4 \dot{x}+5 x=10 \sin \left(\frac{1}{2} t ight), \quad x(0)=\frac{1}{2}, \quad \dot{x}(0)=0\] Plot the response \(x(t)\) for \(0 \leq t \leq 20\) by a....
Study smarter with the SolutionInn App