Question

follow the To Do list in the comments to finish the program, and send a response...

follow the To Do list in the comments to finish the program, and send a response to this topic with your .class files attached. Also, please include your name in the output as the program's author.

/* Week2 in-class exercise
   Name: Average.java
   Author: James Gao
   Date: 01/10/2010

*/

public class Average {

        public static void main(String[] args) {

                double grade1 = 76.0;
                double grade2 = 83.0;
                double grade3 = 62.0;


                //  TO DO:
                //
                //  a.  Compute and display the average grade

                //  b.  Display a PASS/FAIL message
                //        average >= 75.0  PASS
                //        average <  75.0  FAIL

                System.out.println("Author: Your Name");

        }
}

Homework Answers

Answer #1
/* Week2 in-class exercise
   Name: Average.java
   Author: James Gao
   Date: 01/10/2010

*/

public class Average {

    public static void main(String[] args) {

        double grade1 = 76.0;
        double grade2 = 83.0;
        double grade3 = 62.0;


        //  TO DO:
        //
        //  a.  Compute and display the average grade

        //  b.  Display a PASS/FAIL message
        //        average >= 75.0  PASS
        //        average <  75.0  FAIL

        System.out.println("Author: Your Name");
        double average = (grade1+grade2+grade3)/3;
        System.out.println("Average: " + average);

        if (average >= 75.0) {
            System.out.println("PASS");
        } else {
            System.out.println("FAIL");
        }
    }
}

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
follow the To Do list in the comments to finish the program, and send a response...
follow the To Do list in the comments to finish the program, and send a response to this topic with your .class files attached. Also, please include your name in the output as the program's author. /* Week2 in-class exercise Name: myName.java Author: Date: */ //import the Scanner class to get user input import java.util.Scanner; public class myName { public static void main(String[] args) { // TO DO: // // a. Create a new Scanner to get user input //...
/* *Your name *Date * *Explanation of Program *-Modifying the first program * - print,printf, escape...
/* *Your name *Date * *Explanation of Program *-Modifying the first program * - print,printf, escape values, arithmetic operators */ public class Welcome1 { //main method begins execution f Java application public static void main (String [] args) { System.out.println("Welcome to Java Programming"); }//end method mai }//end class Welcome1 /* Output copied from display/message windowo * ----jGRASP exec: java Welcome1 *Welcom to Java Programming * *----jGRASP: operation complete. */ in JAVA Please edit this program in Java and update it
Finish the CustomerAccountTransactions program that reads customer accounts receivable data from a file and then applies...
Finish the CustomerAccountTransactions program that reads customer accounts receivable data from a file and then applies a series of transactions to the accounts. Its main() method uses the CustomerAccounts class to manage a collection of CustomerAccount objects: reading customer accounts data & transactions, and obtaining a String showing the customer accounts data after the operations are complete. You will need to complete the readCustomerAccounts () and applyTransactions() methods in the CustomerAccounts class. First, please fill in your name in the...
1) add toString method to BankAccount and SavingsAccount classes 2) Override the withdraw() in SavingsAccount so...
1) add toString method to BankAccount and SavingsAccount classes 2) Override the withdraw() in SavingsAccount so that it will not withdraw more money than is currently in the account. 3) Provide constructors for SavingsAccount 4) Add this feature to SavingsAccount: If you withdraw more than 3 times you are charged $10 fee and the fee is immediately withdrawn from your account.once a fee is deducted you get another 3 free withdrawals. 5) Implement the Comparable Interface for SavingsAccount based on...
I entered in this code for my programming fundamentals class for this question To encourage good...
I entered in this code for my programming fundamentals class for this question To encourage good grades, Hermosa High School has decided to award each student a bookstore credit that is 10 times the student’s grade point average. In other words, a student with a 3.2 grade point average receives a $32.0 credit. Create an application that prompts a student for a name and grade point average, and then passes the values to a method (computeDiscount) that displays a descriptive...
The goal in this exercise is to develop a program that will print out a list...
The goal in this exercise is to develop a program that will print out a list of student names together with other information foreach. The tab character (an escape sequence) is helpful in getting the list to line up nicely. A program with only two names is in the file Names.java. // ************************************************************ // Names.java // // Prints a list of student names with their hometowns // and intended major // ************************************************************ public class Names { // -------------------------- // main...
The following program creates a linked list which contains 5 links. Add a method called doubleValue()...
The following program creates a linked list which contains 5 links. Add a method called doubleValue() to the LinkedList class. The doubleValue() method must double the value of the number data field in each link. Add the required code to the main() method to call the doubleValue() method and display the revised list. public class Link { private int number; private Link next;      public Link(int x) { number = x; }    public void displayLink() { System.out.println("The number is:...
The following program creates a linked list which contains 5 links. Add a method called doubleValue()...
The following program creates a linked list which contains 5 links. Add a method called doubleValue() to the LinkedList class. The doubleValue() method must double the value of the number data field in each link. Add the required code to the main() method to call the doubleValue() method and display the revised list. public class Link { private int number; private Link next;      public Link(int x) { number = x; }    public void displayLink() { System.out.println("The number is:...
Create an application to accept data for an array of five CertOfDeposit objects, and then display...
Create an application to accept data for an array of five CertOfDeposit objects, and then display the data. Use these classes and this code template to solve the problem: import java.time.*; public class CertOfDeposit {     private String certNum;     private String lastName;     private double balance;     private LocalDate issueDate;     private LocalDate maturityDate;     public CertOfDeposit(String num, String name, double bal, LocalDate issue) {     }     public void setCertNum(String n) {     }     public void setName(String name) {     }     public void setBalance(double bal) {     }     public...
I need this before the end of the day please :) In Java 10.13 Lab 10...
I need this before the end of the day please :) In Java 10.13 Lab 10 Lab 10 This program reads times of runners in a race from a file and puts them into an array. It then displays how many people ran the race, it lists all of the times, and if finds the average time and the fastest time. In BlueJ create a project called Lab10 Create a class called Main Delete what is in the class you...