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
mars1129 [50]
3 years ago
11

(3)(6 Points) During a sale at a store, a 10% discount is applied to purchases over $10.00. Write a program that asks for the am

ount of a purchase, then calculates the discounted price. The purchase amount will be input in cents (as an integer). These are two examples of your expected program's execution.
Computers and Technology
1 answer:
Galina-37 [17]3 years ago
7 0
I only need point sort
You might be interested in
Grade Average Lab Assignment Purpose: The goal of this lab assignment is to learn how to use for loops and if/else commands. Wri
miss Akunina [59]
<h2>Answer:</h2><h2></h2>

//class to test the Grade class

public class GradeTest{

    public static void main(String []args){        

       //create the grades to be averaged

      double [] grades = {23, 45, 67, 12.6};

       

       //create an object of the Grade class and

       //pass in the necessary arguments to the constructor

       Grade grade = new Grade("John", grades);

       

       //print out the results from the Grade object.

       System.out.println("Your name is " + grade.getName());

       System.out.println("Your average score is " + grade.getAverage());

       System.out.println("Your letter grade is " + grade.getLetterGrade());

       

   }

}  //End of the GradeTest class

//The Grade class

class Grade {

   

   //create instance variables

   private String name;

   private double [] grades;

   

   //constructor for the class

  public Grade(String name, double [] grades){

       

       //initialize the instance variables

      this.name = name;

       this.grades = grades;

       

   }

   

   //method to return the name of the student

  public String getName(){

       //return the name

       return this.name;

   }

   

   

   //method to calculate the average of the grades

  public double getAverage(){

       

       double [] grades = this.grades;

       

       //initialize some needed variables

       double sum = 0;

       double average = 0;

       

       //loop through the grades array and add each element to the sum variable

       for(int i =0; i < grades.length; i++){

           sum += grades[0];    

       }

       

       //calculate the average

      average = sum / grades.length;

       

       //return the average grade

       return average;

     

   }

   

   

   //method the calculate the letter grade from the average

   public char getLetterGrade(){

       

       //initialize some variables

      double average = this.getAverage();

       char letterGrade;

       

       //check the average and determine its corresponding letter grade

       if(average >= 40 && average < 45){

           letterGrade = 'E';

       }

       else if(average >= 45 && average < 50){

           letterGrade = 'D';

       }

       else if(average >= 50 && average < 60){

           letterGrade = 'C';

       }

       else if(average >= 60 && average < 70){

           letterGrade = 'B';

       }

       else if(average >= 70 && average <= 100){

           letterGrade = 'A';

       }

       else {

           letterGrade = 'F';

       }

       //return the letter grade

       return letterGrade;

       

   }

   

}   //End of the Grade class

<h2>Sample Output:</h2>

Your name is John

Your average score is 23.0

Your letter grade is F

<h2>Explanation:</h2>

The code above is written in Java and it contains comments explaining important parts of the code. It also contains a sample output got from running the program. To run this on your machine, copy the code and save in a file named GradeTest.java

3 0
3 years ago
3. When the heart is contracting, the pressure is .highest. This is called the
Nonamiya [84]

Answer:

3. b. Systolic pressure

4. b. Body temperature

5. d. Clinical

Explanation:

3. During the systole, the pressure of the blood in when the heart contracts is increased and it is known as the systolic blood pressure

4. Temperature is a measure of heat available in a body for transfer depending on the heat capacity of the body, therefore, the balance between heat produced and total heat lost is body temperature

5. The clinical thermometer is made up of mercury contained in a bulb at the end of a uniform and narrow glass tube. The increase in temperature of the mercury when the thermometer is in contact with an elevated temperature results in the expansion of the mercury which is observed when the mercury moves up the thermometer.

7 0
3 years ago
Modify your main.c file so that it allocates a two dimensional array of integers so that the array has 20 rows of 30 integers in
Alexandra [31]

Answer:

Explanation:

b

7 0
3 years ago
In the value chain concept, upgrading IT is considered what kind of activity?
ANTONII [103]

Answer:

Upgrading IT is considered as B. Support activity

Explanation:

It is considered as support activities because they help the primary activities move smoothly and consistently.

For example, efficient communication between a particular firm and its subsidiaries will be extremely difficult without the necessary IT infrastructure, which will slow down the primary activities that are to be carried out.

6 0
3 years ago
. ------------ means that the two merging companiesbecame history and a new firm
kirill115 [55]

Answer:

The correct answer is B. Merger means that the two merging companies became history and a new firm is established.

Explanation:

A merger refers to the union of two companies that can be seen as equals. Two companies decide to join forces to increase the strength of their assets, have a greater market and consumer base and ultimately obtain greater profits. The two companies or corporations become joint property and are registered as a new legal entity, which has a different identity from that of the two companies that joined for the merger.

8 0
3 years ago
Other questions:
  • Which steps will complete adding the cells A45 to A55?
    8·1 answer
  • What devices are used to connect computers to a network?
    10·1 answer
  • A student dissolves some solid sodium hydroxide in a beaker of water.
    5·2 answers
  • Having network users login with a username and password is an example of:
    12·1 answer
  • Which statement below is true about how the functions of the digestive and circulatory system are connected.
    7·1 answer
  • Which of the following best describes a situation where software should be upgraded instead of replaced?
    6·1 answer
  • Match the component to its function. resistor inductor capacitor battery transistor This component stores a temporary charge. ar
    7·2 answers
  • David Griffin on How Photography Connects Us
    11·1 answer
  • Which of the following activities do not involve Information technology​
    6·1 answer
  • How does communication produce clarity and direction​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!