A shopping cart consists of various items. An item can be either a household or an...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
A shopping cart consists of various items. An item can be either a household or an electronic item. The following UML diagram represents item, household item, electronic item and their relationship. Householditem (-) discount: double (+) Householditem(id: String, description: String, unitPrice: double, discount: double) (+) computeSale Price(): double (+) toString(): String (-) id: String (-) description: String (-) unitPrice: double (-) numberOfitem: int Item (+) Item(id: String, description: String, unitPrice: double) (+) getNumberOfitem(): int (+) computeSale Price(): double (+) toString(): String Electronicitem (-) warrantyPeriod: int (-) warrantyCost: double (+) Electronicitem (id: String, description: String, unitPrice: double, warrantyPeriod: Int, warrantyCost: double) (+) computeSale Price(): double (+) toString(): String Given the above scenario and UML diagram, write in Java, the method for computeSalesPrice() in the Item DDC. A shopping cart consists of various items. An item can be either a household or an electronic item. The following UML diagram represents item, household item, electronic item and their relationship. Householditem (-) discount: double (+) Householditem(id: String, description: String, unitPrice: double, discount: double) (+) computeSale Price(): double (+) toString(): String (-) id: String (-) description: String (-) unitPrice: double (-) numberOfitem: int Item (+) Item(id: String, description: String, unitPrice: double) (+) getNumberOfitem(): int (+) computeSale Price(): double (+) toString(): String Electronicitem (-) warrantyPeriod: int (-) warrantyCost: double (+) Electronicitem (id: String, description: String, unitPrice: double, warrantyPeriod: Int, warrantyCost: double) (+) computeSale Price(): double (+) toString(): String Given the above scenario and UML diagram, write in Java, the method for computeSalesPrice() in the Item DDC.
Expert Answer:
Related Book For
South-Western Federal Taxation 2020 Comprehensive
ISBN: 9780357109144
43rd Edition
Authors: David M. Maloney, William A. Raabe, James C. Young, Annette Nellen, William H. Hoffman
Posted Date:
Students also viewed these programming questions
-
1. How important is it to have a mix of products? When shoes slack off during the winter, the apparel business picks up. What are the implications of seasonal products? What problems does this create...
-
Case Study: Quick Fix Dental Practice Technology requirements Application must be built using Visual Studio 2019 or Visual Studio 2017, professional or enterprise. The community edition is not...
-
An airline company wants to create an online air ticket purchase for its customers. The company wants to attract customers to participate or purchase from its website by offering a discount to the...
-
A water sprinkler sprays water over a distance of 30 feet while rotating through an angle of 135. What area of lawn receives water? 135 30 ft
-
Write out the Security Market Line (SML) equation, use it to calculate the required rate of return on each alternative, and then graph the relationship between the expected and required rates of...
-
A rigid insulated container has two rooms separated by a membrane. Room A contains 1 kg air at 200oC and room B has 1.5 kg air at 20oC, both rooms at 100 kPa. Consider two different cases 1) Heat...
-
When you move your body, is your cerebrum in complete control? What other parts of your brain are involved? Explain.
-
Modern Metalworks Company has two departments, milling and assembly. The company uses a job costing system with a plantwide cost driver rate that is computed by dividing plantwide overhead costs by...
-
Pop Eye Company manulactures two types of sailboats, imple and Complex. impl is a highvolume product hat is relatively simplsicin naure,whle Complexis a oweichme produd hatcomplex manufacturing...
-
Consider an abatement cost function C(e,)=(abe) 2 /2b, where is the amount of private investment to reduce abatement costs. There are J identical firms. The social damage function is D(E)=dE 2 /2....
-
Express the following numbers to three significant digits in the e-format. Use one number to the left of the decimal and two to the right. 0.001605 0.000013987 407 33750 40
-
If one table and two lamps cost $88, and two tables and three lamps cost $153, how much does a lamp cost?
-
Gearhead started out selling bicycles, but later added shoes, and then many other outdoor activity related items. this is an example of how gearhead's product assortment has multiple choice gotten...
-
The accounting practices of not-for-profits are more compatible with those of business than with those of government. Like governments, not-for-profits account for their resources in funds. How funds...
-
What are seven sources from which information about the organization's reporting procedures and practice might come.
-
the promoters of the Madison Square Garden project have suggested that with additional expenditures on marketing and ongoing upgrades during the first four years of the new facility's use, the...
-
Consider an economy with two risky assets A and B. The expected returns are = 0.20 and B = 0.10. The variance-covariance matrix is: = 0.090 0.018 0.018 0.01 (a) What is the composition of the...
-
What is a content filter? Where is it placed in the network to gain the best result for the organization?
-
In 2019, Skylar sold an apartment building for $20,000 cash and a $300,000 note due in two years. Skylars cost of the property was $250,000, and he had deducted depreciation of $150,000, $60,000 of...
-
Reinus, a cash basis taxpayer, died on February 3. During the year, the estate?s executor made a distribution of $12,000 from estate income to Reinus?s sole heir and adopted a calendar year to...
-
Briefly discuss the requirements for a redemption to qualify as a not essentially equivalent redemption.
-
Reconsider Problem 18. Management has decided that the $5 million raised through stock should be split between common stock and preferred stock. Common stock will be used to raise $3,000,000 and...
-
Repeat Problem 23 assuming that the stock price is growing at 3 percent per year. Data from problem 23 Lahoma Enterprises, Inc., needs $15 million to finance a major product development. The project...
-
Repeat Problem 23 assuming the stock offering will be preferred stock rather than common stock. The preferred stock will sell for $120/share, pay a $9 annual dividend, and have a cost of selling of...
Study smarter with the SolutionInn App