1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Alenkinab [10]
3 years ago
5

• Open your Netbeans IDE and answer the following question

Computers and Technology
1 answer:
VARVARA [1.3K]3 years ago
8 0

Answer:

public static void main(String[] args)

   {

       int cdCount;

       double cdCountAfterDiscount;

       DecimalFormat df = new DecimalFormat("$##.##"); // Create a Decimal Formatter for price after discount

       System.out.println("Enter the amount of CD's bought");

       Scanner cdInput = new Scanner(System.in);  // Create a Scanner object

       cdCount = Integer.parseInt(cdInput.nextLine());  // Read user input

       System.out.println("CD Count is: " + cdCount);  // Output user input

       if(cdCount <= 14 )

       {

           System.out.println("There is no discount");

           System.out.println("The final price is " + cdCount*3.5);

       }

       if(cdCount >= 15 && cdCount<=50)

       {

           System.out.println("You have a 1% discount.");

           cdCountAfterDiscount = (cdCount *3.5)-(3.5*.01);

           System.out.println("The final price is " + df.format(cdCountAfterDiscount));

       }

       if(cdCount >= 51 && cdCount<120)

       {

           System.out.println("You have a 5% discount.");

           cdCountAfterDiscount = (cdCount *3.5)-(3.5*.05);

           System.out.println("The final price is " + df.format(cdCountAfterDiscount));

       }

       if(cdCount >= 120)

       {

           System.out.println("You have a 10% discount.");

           cdCountAfterDiscount = (cdCount *3.5)-(3.5*.1);

           System.out.println("The final price is " + df.format(cdCountAfterDiscount));

       }

   }

You might be interested in
If there is an value in a array, and the same value comes at the same spot, does it cancel each other out or does it reassing th
kondaur [170]

Explanation:

In simple English, an array is a collection.

In C also, it is a collection of similar type of data which can be either of int, float, double, char (String), etc. All the data types must be same. For example, we can't have an array in which some of the data are integer and some are float.

8 0
3 years ago
You are studying at the library and someone at your table has some great study material. both of you have an ipad with you. you
myrzilka [38]
C.apple domain is to use the personal sharing files from one computer to another computer
3 0
3 years ago
To join a social network you create an avatar
Luda [366]
Yes you have to do that so people recognize u but not for all social media unless ur talking bout Facebook, Twitter, kik,and I can't think of anything else. At the moment I know lots more just can't think bout it right now
7 0
3 years ago
Read 2 more answers
Describe at least one reason why transitioning from the Cisco implementation of STP to the Cisco implementation of RSTP is seaml
kherson [118]

Answer:

STP mainly uses 5 states in a network, in which some states are replaced in RSTP which improves the time efficiency.

Explanation:

STP mainly uses five states i.e.  Learning, Listening, Blocking, Disabling and Forwarding to overcome the problem of collision in a network.  

RSTP replaced the three states of STP i.e listening, learning, and blocking by Discarding, which results in the time efficiency as compared to STP.  

As STP takes minutes to complete the network inter connectivity, RSTP completes it in seconds.

This is one of the main reason why an administrator want to change to RSTP.

6 0
3 years ago
Which of the following need to be assessed during unit testing?
diamong [38]
E) both C and D Erro handling and execution paths
8 0
3 years ago
Other questions:
  • List two ways that guest could be defined
    12·2 answers
  • Which devices are managed through device management?
    15·2 answers
  • How does a color change if you add more gray to it
    7·1 answer
  • What is the voltage drop across R4 in the diagram shown above?
    13·1 answer
  • Please refer to the MIPS solution in the question above. How many total instructions are executed during the running of this cod
    10·2 answers
  • Match each type of software license with the appropriate definition.
    11·1 answer
  • Which of the following is the correct financial function that returns the periodic payment for a loan?
    10·1 answer
  • Which of the following is true of binary files?
    6·2 answers
  • Help!!
    15·1 answer
  • Define a function below, posodd_number_filter, which takes a single numerical argument. Complete the function to return accepted
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!