Assignment Instructions are as follows: Design and define a class named Order, which is used to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Assignment Instructions are as follows: Design and define a class named "Order", which is used to create objects to store each customer's order for a fast food restaurant. Write a java program (Order.java) to provide definition of the class, and a test program (OrderTest.java) to create an Order object instance (based on user inputs: the foods that they order, and the price of each foods, etc.), and print out the data related to that order. Should include at least the following order information in Order class: Private instance variables: (1) order id, (2) list of foods that user ordered (both type and quantity, e.g., 1 chicken sandwish, 1 medium fry), (3) the unit price of each food (e.g., chicken sandwish: $4.99, medium fry: $1.99). Public methods: (1) at least one constructor, (2) get/set methods that provide public interfaces for instance variables, (3) calculate and return total amount, (4) calculate and return tax amount, and (5) calculate and return final bill amount. (6) a print method that print out all order related information as an invoice/receipt and display it in console. You may add other attributes and methods in Order class, be creative. Assignment Instructions are as follows: Design and define a class named "Order", which is used to create objects to store each customer's order for a fast food restaurant. Write a java program (Order.java) to provide definition of the class, and a test program (OrderTest.java) to create an Order object instance (based on user inputs: the foods that they order, and the price of each foods, etc.), and print out the data related to that order. Should include at least the following order information in Order class: Private instance variables: (1) order id, (2) list of foods that user ordered (both type and quantity, e.g., 1 chicken sandwish, 1 medium fry), (3) the unit price of each food (e.g., chicken sandwish: $4.99, medium fry: $1.99). Public methods: (1) at least one constructor, (2) get/set methods that provide public interfaces for instance variables, (3) calculate and return total amount, (4) calculate and return tax amount, and (5) calculate and return final bill amount. (6) a print method that print out all order related information as an invoice/receipt and display it in console. You may add other attributes and methods in Order class, be creative.
Expert Answer:
Posted Date:
Students also viewed these programming questions
-
New-Project Analysis The Campbell Company is considering adding a robotic paint sprayer to its production line. The sprayer's base price is $800,000, and it would cost another $20,000 to install it....
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
CANMNMM January of this year. (a) Each item will be held in a record. Describe all the data structures that must refer to these records to implement the required functionality. Describe all the...
-
A quality improvement program has been instituted in an organization to reduce total quality costs. Discuss the impact of such a program on prevention, appraisal, and failure costs.
-
A bicycle wheel has a small pebble embedded in its tread. The rider sets the bike upside down, and accidentally bumps the wheel, causing the pebble to move through an arc length of 25.0 cm before...
-
What gets you excited, gives you energy, and motivates you to excel?
-
What is the primary disciplinary mechanism used by the Information Systems Audit and Control Association in relation to its members? Do you think this disciplinary mechanism is effective? Why?
-
Tonys computer center is picking up in business, so he has decided to expand his bookkeeping system to a general journal/ledger system. The balances from August have been forwarded to the ledger...
-
Officials at a waste management plant are to begin serving a new neighborhood. They want to find a model to best be able to predict that weight of trash (in pounds) that they will have to pick up for...
-
According to Hofstede, in which country would it be most difficult to implement transformational leadership? do fast and answer must be zero plagrasied
-
Describe what is meant by the phase of the transfer function.
-
What is the criterion that defines a corner, or \(3 \mathrm{~dB}\), frequency?
-
For what types of business applications might linear programming techniques be useful?
-
Describe what is meant by a system transfer function in the \(s\)-domain.
-
What is meant by EVPI?
-
What law of thermodynamics gives the measure of temperature?
-
Troy is a qualified radiologist who operates a successful radiology practice from purpose- built rooms attached to his house. Troy works in the practice three days a week, and the other two days he...
-
Davidson Company sold one of its worn-out delivery trucks on December 31, 2019. The truck was purchased on January 1, 2016, for \(\$ 50,000\) and was depreciated on a straight-line basis over a...
-
What are the three major types of long-term assets that require a periodic write-off? Present examples of each, and indicate for each type of asset the term that denotes the periodic write-off to...
-
Which of the following is not an example of a natural resource? a. Oil reserves c. Oil rig b. Standing timber d. Mineral deposits
Study smarter with the SolutionInn App