A software company sells a package that retails for $99. Quantity discounts are given according to the following table: Quantity Discount 10-19 20% 20-49 30% 50-99 40% 100 or more 50% Write a program that asks the user to enter the number of packages purchased. The program should then display the amount of the discount (if any) and the total amount of the purchase after the discount. For instance, to calculate 20% of a value N, you can use the formula: (20 / 100.0) * N (or 0.2 * N).

Question

Sorry, using java:

 

3.8: Software Sales
A software company sells a package that retails for $99. Quantity discounts are given according to the following table:
Quantity Discount
10-19 20%
20-49 30%
50-99 40%
100 or more 50%
Write a program that asks the user to enter the number of packages purchased. The program should then display the amount of the discount (if any) and the total amount of the purchase after the discount. For instance, to calculate 20% of a value N, you can use the formula:
(20 / 100.0) * N (or 0.2 * N).

Expert Answer

Want to see the step-by-step answer?

Check out a sample Q&A here.

Want to see this answer and more?

Experts are waiting 24/7 to provide step-by-step solutions in as fast as 30 minutes!*

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.
Tagged in
Engineering
Computer Science

Java

Related Computer Science Q&A

Find answers to questions asked by students like you.

Q: Right now we have a CourseListType that will hold a static 50 courses. Now we need to make that a li...

A: #ifndef COURSELISTTYPE_H_INCLUDED#define COURSELISTTYPE_H_INCLUDED #include <string>#include "...

Q: Create a file named tmpfiles that contains the names of the contents of the /tmp directory in ubunto...

A: ls command:  ls is one of the commands used most frequently and is also very useful. Its basic funct...

Q: What must be specified in an instruction set? Give a description of the SRC.

A: Specification in instruction set: The instruction set is basically the part of the computer which p...

Q: Cse

A: Hey, since multiple part questions posted, we will answer first three question according to our poli...

Q: Create an application that will catch an exception using the try catch block. Use Java as the langua...

A: whenever we need the exceptions to be handled, we use try and catch blocks The exceptions that were ...

Q: . Given the following characteristics for a magnetic tape using linear recording:Density = 1600 bpiS...

A: Note: We are authorized to answer only one question at a time, as per the BNED guidelines. Please re...

Q: If N represents the number of elements in the queue, then the dequeue method of the LinkedQueue clas...

A: The Answer is False because when we see the dequeue method it have statements which have constant ti...

Q: Given that h(p)=p2−4p+7, Find;h(x-4)

A: Answer: h( x - 4 ) = x 2 - 12x + 39.

Q: Draw a use case diagram and class diagram for Registration system in Sur university College, which S...

A: Use case diagram:

Q: Computer Science Question

A: Aim : To write C function to convert a binary number to the decimal Here the function prototype is i...

Q: 2. draw The Interactivity Chart (structure chart) for find Maximum of Given 3 Number.

A: TO DRAW THE INTERACTIVITY CHART FOR FINDING MAXIMUM OF GIVEN THREE NUMBER- STEPS INVOLVED TO FIND MA...

Q: What is the output of the following code segment?

A: Click to see the answer

Q: Draw a flow chart for Do-While loop ( in c++ ) for controlled/uncontrolled infinite loop iterations.

A: Flow-chart: A flow-chart is a diagrammatic representation of the flow of the execution of the statem...

Q: 1) What is BYOD and IoT? And how can they increase productivity in a company?

A: BYOD and IoT Bring Your Own Device means to allow one's personally owned device. Its main policy is...

Q: Problem_#10] Develop a SOP Boolean equation and logic circuit given the truth table shown below. INP...

A: Click to see the answer

Q: Give the similarities between network sniffing and wiretapping ? Why are they considered as passive ...

A: Similarities between network sniffing and wiretapping discussed as following- Basically what is snif...

Q: Write a c++ program that implements a linked list as an abstract datatype. The program must be: *Be ...

A: #include <iostream>#include <list> using namespace std; int main(int argc, char** argv) ...

Q: Using Java. I am having issues creating a program that - This program will take in the lengths of th...

A: The required Java program is: import java.io.*;import java.util.*;  import java.lang.Math; class tri...

Q: In today’s business scenario social media is playing a vital role in making business decisions. Bein...

A: Social media plays vital role in making business decisions. In this digital world, everything is in ...

Q: Find the Checksum value for 10110011 10101011 01011010 11010101 for 8-bit-sized (or byte) words.

A: Adding All the words and finding 1's complement of the final result.  

Q: C++ Code /////// #include <iostream> class BTNode {public:int item;BTNode *left;BTNode *right;...

A: #include <bits/stdc++.h>using namespace std;class TreeNode{   public:      int val;      TreeN...

Q: Difference between Const, Read only, Static and non-static variable in C#.

A: Const - Const is nothing but "constant", a variable of which the value is constant but at compile ti...

Q: num1 = int(input("Enter first value:"))num2 = int(input("Enter second value:"))num3 = int(input("Ent...

A: num1 = int(input("Enter first value:"))num2 = int(input("Enter second value:"))num3 = int(input("Ent...

Q: C++

A: #include <iostream> int main() { // Declare the number int num; std::cout << "Enter th...

Q: Consider the below code snippet.  Assume bool foundPair and int pairCount are both declared and have...

A: Answer : True.  

Q: 2) In football, a touchdown counts as 6 points, an extra point after a touchdown counts as 1 point, ...

A: #include<stdio.h> int main(){    int td,s,ep,f,total;        printf("Number of touchdowns: ");...

Q: Construct a Context Free Grammar(CFG) based on Regular Expression(RE) below: Regular Expression: ((0...

A: The regular expression (RE) contains the symbol 0 and 1 only.  The expression is: ((00+01)*01)+101(0...

Q: For this lab you will: Solve with an algorithm Code it using Python Fun With Strings Write a progr...

A: Multiple parts are asked in one question so the first three parts will be answered. Please upload th...

Q: Describe the technology equipment feild .and list possible jobs in this area

A: The technology equipment field includes distributer and manufacturer of computer system, mobile phon...

Q: screen shoot shows the text arrayboundedqueue and arrayunboundedqueue which approach does the text's...

A: Objective: Here, Array-bounded and unbounded Queue implementations are given to verify which data st...

Q: Computer Science Question

A: Introduction of Program: In this C program, the User enters the binary number then the program will ...

Q: C++ Given int x = 13 and int y = 4 which of the following C++ statements is false?     x / y e...

A: Given data x = 13 y = 4 Answer : x / y evaluates to 3

Q: Write a program that simulates a simple calculator. It reads two integers and a character. If the ch...

A: Program: //header file declarations #include<iostream> using namespace std; int main() { //var...

Q: Write a C++ program that tells the user that the number entered is less than or greater than 10? Wri...

A: #include<iostream> using namespace std; int main(){     int n;    cout<<"Enter the value...

Q: Q.4.1 Modify the while loop so that when a user enters a price, the system validateswhether the valu...

A: With the while loop we can execute a set of statements as long as a condition is true.

Q: Store a new XMLHttpRequest object in the xhr variable, then assign requestHandler function as the "e...

A: Code snippet: function requestHandler() {     console.log("handling response: " + this.responseText)...

Q: Please implement this web browser menu bar. Should be the same. If you already visited the pages Hom...

A: The HTML <nav> element represents a section of a page whose purpose is to provide navigation l...

Q: Do Trojan horses carry viruses or worms?

A: Viruses: It is a type of computer viruses that inserts a copy and it becomes part of the program, a...

Q: Counts the number of currently running system processes in Ubunto-Linux

A: The ps command is used for listing the processes which are currently running. The aux command shows ...

Q: The language is Java. The chapter it is in is on Looping.

A: Programming approach Here, we use the while loop which ensures integer entered by the user should be...

Q: Write a program that takes in a line of text as input, and outputs that line of text in reverse. The...

A:   Code in java is below- import java.util.Scanner;  // importing the util package   public class Lab...