Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Please tell me whats wrong with my code

import java.util.Scanner; //will allow you to read from the screen

public class GradesArray {

public static void main (String[]args) {

String[] nameArray = {"Jon", "Rajesh", "Elizabeth", "Julio", "Chang"};

String[] gradeArray = new String[5]

double[] score1Array = {72, 60. 45, 70, 89};

double[] score2Array = {50, 70, 60, 85. 90};

double[] score3Array = {70, 80, 90, 100, 100};

double[] averageArray = new double[5];

for(int i=0; i<4; i++){ //why 4?

       averageArray[i] = (score1Array[i] + score2Array[i] + score3Array[i])/3;

    if (averageArray[i] > 90.0){

     gradeArray[i] = "A";

    } else if (averageArray[i] > 80.0){

     gradeArray[i] = "B";

    } else if (averageArray[i] > 70.0){

     gradeArray[i] = "C";

    } else if (averageArray[i] > 60){

     gradeArray[i] = "D";

    } else{

     gradeArray[i] = "F";

    }

    System.out.println("Name is: " + nameArray[i] + " Grade is: " + gradeArray[i] + " Average is: " + nameArray[i]);

}

}

}

//end main method

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92632088
  • Price:- $10

Priced at Now at $10, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Please tell me about planning and installing a wireless

Please tell me about Planning and Installing a Wireless Network

Taylor found that 8 of the recipients of loans form a

Taylor found that 8% of the recipients of loans form a particular mortgage lender default within 3 years. If he takes a random sample of 736 customers who received loans 3 years ago, what is the average number of custome ...

Question need two different postsresponses with 200 words

Question: Need two different posts(responses) with 200 words each on the below topic. Read Four (4) academically reviewed articles on Cyber Security and Risk Management and complete the following activities:(Wikipedia ar ...

How should facebook and other companies protect privacy

How Should Facebook and Other Companies Protect Privacy While Letting People Share Their Information Between Apps and Services?

What is 4g and its benefits how fast is your internet

What is 4G and its benefits. How fast is your Internet service supposed to be for stationary users?

Strategies when resources are constraineda project manager

Strategies When Resources Are Constrained A project manager has fewer options for accelerating project completion when additional resources are either not available or the budget is severely constrained. This is especial ...

You are the senior consultant at abacus consulting tasked

You are the Senior Consultant at Abacus Consulting, tasked with the database project for Amadeus Real Estate client. The company employs real estate agents who work with customers to buy and sell properties (both residen ...

Question critical infrastructures -1discuss cybersecurity

Question: Critical Infrastructures - 1. Discuss cybersecurity policy issues affecting SCADA and ICS systems for Critical Infrastructure services for the public, and compare those issues to the policy issues that affect t ...

Write the java source code necessary to build a solution

Write the Java source code necessary to build a solution for the problem below:You have just taken a new "Teach for America" job in a very rural, impoverished neighborhood. The school system does not provide you with any ...

Question 1 designing team and team identityusing the

Question: 1. Designing Team and Team Identity. Using the Internet, team should read at least 5 academically reviewed articles on designing. 2. Please do not change the wording of the original summary. Include the team me ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As