Question 2 A software company sells a software package for $99. Discount is available according to...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Question 2 A software company sells a software package for $99. Discount is available according to how many packages were bought. They are as follows: Quantity bought < 10 10-19 20-29 30-39 >= 40 % Discount No discount 2.5% 5% 7.5% 10% Write a program in Java to read a value from the keyboard for the number of packages sold and then display the following with appropriate descriptions: The numer of packages sold The cost before discount The % discount and the discount amount (if there is any) The net price to pay Remember to validate the input value. If it is an invalid value (less than or equal to 0) then display an error message else display information described above. You should use functional decomposition in your program. Hence, you should have functions/methods to do a particular task. First show your high-level algorithm. Which will consitute your functions/methods and then refine the algorim to be more specific. Question 2 A software company sells a software package for $99. Discount is available according to how many packages were bought. They are as follows: Quantity bought < 10 10-19 20-29 30-39 >= 40 % Discount No discount 2.5% 5% 7.5% 10% Write a program in Java to read a value from the keyboard for the number of packages sold and then display the following with appropriate descriptions: The numer of packages sold The cost before discount The % discount and the discount amount (if there is any) The net price to pay Remember to validate the input value. If it is an invalid value (less than or equal to 0) then display an error message else display information described above. You should use functional decomposition in your program. Hence, you should have functions/methods to do a particular task. First show your high-level algorithm. Which will consitute your functions/methods and then refine the algorim to be more specific.
Expert Answer:
Posted Date:
Students also viewed these programming questions
-
Suppose we create a model to predict the average profit based on advertising budget and segment. There are three segments: A, B, and C, and the units of the variables profit and budget are dollars....
-
Python and most Python libraries are free to download or use, though many users use Python through a paid service. Paid services help IT organizations manage the risks associated with the use of...
-
You have been provided with the description of a programming language, J, intended for scripting applications. Its syntax is similar to a cut-down version of Java in that it consists of function...
-
Rand Medical manufactures lithotripters. Lithotripsy uses shock waves instead of surgery to eliminate kidney stones. Physicians' Leasing purchased a lithotripter from Rand for $2,000,000 and leased...
-
Custom Auto Parts (CAP) started the 2016 accounting period with the balances given in the financial statements model shown below. During 2016, CAP experienced the following business events: 1....
-
Explain how a typical subsurface sewage system (septic system) functions. What are the basic components? How does the soil characteristics on a site impact the system's ability to function? What are...
-
We are separating methanol and water in a staged distillation column at total reflux to determine Murphree efficiency. Pressure is \(101.3 \mathrm{kPa}\). The column has a 2.0 -in. head of liquid on...
-
A radioactive material of thermal conductivity k is cast as a solid sphere of radius ro and placed in a liquid bath for which the temperature T and convection coefficient h are known. Heat is...
-
Mark Robin is a top salesperson at a leading manufacturer of automoble machinery parts. He 3 a disse distur decisive, fact - oriented, direct, and focused on closing the deal He understands the...
-
The extract of statement of financial position for the year ended 31 January 2022 for Pine Ltd and Santolina Ltd are as follows: Extract of statement of financial position for the year ended 31...
-
The following estimates have been prepared for a project: Fixed costs: $ 3 4 , 2 0 0 Depreciation: 2 2 , 8 0 0 Sales price per unit: $ 2 Accounting break - even: ...
-
On May 3 1 , the following data were accumulated to assist the accountant in preparing the adjusting entries for Oceanside Realty: a . Fees accrued but unbilled at May 3 1 are $ 1 0 , 4 0 0 . b . The...
-
What role does cultural entropy play in influencing organizational effectiveness, and how do leaders diagnose and mitigate entropy to nurture a culture of innovation, collaboration, and high...
-
analyze the code and fix the error package shapes; import java.util.Set; public class Rectangle extends Shape implements HasAngles { private double length; private double width; public...
-
Write code that prints a greeting in the following format: Hi, XXX! where xxx is the name of a person stored in the variable name. Assume that name has been declared and initialized. Solve It!
-
Two depository institutions have composite CAMELS ratings of 1 or 2 and are well capitalized Thus, each institution falls into the FDIC Risk Category I deposit insurance assessment scheme. Weights...
-
Copy and complete the statement. 3800 m ? km =
-
Rachel Thomass trial balance balances as follows: Unfortunately, Rachel Thomass bookkeeper was not very experienced. The following transactions were incorrectly entered: (a) Purchase of a computer...
-
Which of the following balances extracted from the books on 31 December would be used as a basis for next years accounts? Equity employed 9,200 Trade receivables 700 Rent and rates 1,000 Trade...
-
There is not just one profit there are hundreds of profits. Do you agree with this statement, taking into account the subjectivity inherent in calculating profit?
Study smarter with the SolutionInn App