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
-
What is the origin of the term kanbans and why are they used in lean systems?
-
Using the following revenue and expense data, prepare a comparative income statement, expressing each item for both 2013 and 2012 as a percentage of net sales (vertical analysis). Round to three...
-
The 23 rd term of the Fibonacci sequence is 28,657 and the 24 th term is 46,368 . What is the 22 nd term of the sequence?
-
(Imputation of Interest with Right) On January 1, 2010, Durdil Co. borrowed and received $500,000 from a major customer evidenced by a zero-interest-bearing note due in 3 years. As consideration for...
-
Which of the following events would make it more likely that a company would choose to call its outstanding bonds?
-
Continuing Payroll Project: Prevosti Farms and Sugarhouse - EERF (Static) Prevosti Farms and Sugarhouse pays its employees according to their job classification. The following employees make up...
-
A gymnast is standing at point O She does a front tuck one movement forward each time a head is flipped and a back tuck one movement backward each time a tail is flipped What is the probability of...
-
How do you think older and younger people might join together to combat the forces of ageism, lookism, sizeism, healthism, and classism?
-
ABC Company has ROE of 14.0, debt to equity ratio of 0.25, total assets of $4,730, and sales of $12,840.What is its net income?
-
Lisa has collected data to find that the number of pages per book on a book shelf has a normal distribution. What is the probability that a randomly selected book has fewer than 162 pages if the mean...
-
Assume that over the past 4 years Joe Corp. stock has earned returns of 30%, 2%, 22%, and 10%. Set up the calculations needed to determine the standard deviations of returns on Joe.
-
Solve using the table. Ages Number of students 15-18 5 19-22 5 23-26 7 27-30 4 31-34 35-38 4 10 Based on the frequency distribution above, find the relative frequency for the class with lower class...
-
A cable hangs between two poles of equal height and 40 feet apart. At a point on the ground directly under the cable and x feet from the point on the ground halfway between the poles the height of...
-
KD Insurance Company specializes in term life insurance contracts. Cash collection experience shows that 20 percent of billed premiums are collected in the month before they are due, 60 percent are...
-
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.
-
Here are two companies: Young corporation and Mature corporation. Young Corporation grows very rapidly, does not pay any dividends and retains all its profits. Mature Corporation stopped growing a...
-
A reverse split is just like a split, but only in a reverse direction. For example, in 1 for 2 reverse split, you receive 1 shares for every 2 shares you hold. How would your answers to the previous...
-
Here is data on the stock prices and returns of General Electric, Boeing and S&P 500 index. Calculate the highlighted cells. A B C D E F G 1 Date GE MONTHLY RETURNS ON GE, BOEING, S&P500, 2000 GE...
Study smarter with the SolutionInn App