Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7805177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:08:23+00:00 2026-06-02T02:08:23+00:00

On the final part of a project i’m doing for school, I am supposed

  • 0

On the final part of a project i’m doing for school, I am supposed to use a if-else statement inside a for loop, but I have no idea how to do this. I could just use a huge lot of if-else statements to do the same thing, but I dont think my teacher would appreciate it.

Here are the instructions for the final part of the homework…

Compute the Grade (A, B, C, D or F) and store in another Array8 called
grades using if-else loop and the following cutoff inside a for-loop
to assign grades.

1.    Average                        Grade
2.    >= 90                          A
3.    >=80 and <90                   B
4.    >=70 and <80                   C
5.    >=60 and <70                   D
6.    <60                            F

This is my code so far…

public class Proj5 {
    public static void main (String[] args) {
        String[] Array1= {new String("Adam"),new String("Smith"),new String("Jones"),new String("Becky"),new String("Taylor")};
        Integer[] Array2={new Integer(90),new Integer(89),new Integer(86),new Integer(76),new Integer(95)};
        Integer[] Array3={new Integer(92),new Integer(79),new Integer(85),new Integer(90),new Integer(87)};
        Integer[] Array4={new Integer(93),new Integer(80),new Integer(90),new Integer(87),new Integer(92)};
        Integer[] Array5={new Integer(90),new Integer(77),new Integer(86),new Integer(92),new Integer(89)};

        double av1 = (((Array2[0]+Array3[0]+Array4[0])/3));
        double av2 = (((Array2[1]+Array3[1]+Array4[1])/3));
        double av3 = (((Array2[2]+Array3[2]+Array4[2])/3));
        double av4 = (((Array2[3]+Array3[3]+Array4[3])/3));
        double av5 = (((Array2[4]+Array3[4]+Array4[4])/3));

        double[] Array6 = {(av1),(av2),(av3),(av4),(av5)};

        double avf1 = (av1*.30)+(Array5[0]*.7);
        double avf2 = (av2*.30)+(Array5[1]*.7);
        double avf3 = (av3*.30)+(Array5[2]*.7);
        double avf4 = (av4*.30)+(Array5[3]*.7);
        double avf5 = (av5*.30)+(Array5[4]*.7);

        double[] Array7 = {(avf1),(avf2),(avf3),(avf4),(avf5)};

        System.out.println("Report for Spring Semester 2009"+
        "\n-------------------------------------------");
        System.out.println("Name Test1 Test2 Test3 Final Average Grade");

        for (int column = 0; column<Array1.length; column++){
            System.out.printf("%s ", Array1[column]);
            System.out.printf("%s   ", Array2[column]);
            System.out.printf("%s    ", Array3[column]);
            System.out.printf("%s    ", Array4[column]);
            System.out.printf("%s    ", Array5[column]);
            System.out.printf("%s    ",  Array7[column]);
            System.out.println(); //start new line of output
        } 
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:08:25+00:00Added an answer on June 2, 2026 at 2:08 am
    char[] Array8 = new char[5];
    
    for (int i = 0; i < Array8.length;i++ ) {
        if (Array6[i] >= 90)
            Array8[i] = 'A';
        else if (Array6[i] >= 80)
            Array8[i] = 'B';
        else if (Array6[i] >= 70)
            Array8[i] = 'C';
        else if (Array6[i] >= 60)
            Array8[i] = 'D';
        else
            Array8[i] = 'F';
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built a system for my final year project. At one part, I
As a part of my final year university project I am designing a social
As part of my Final Year Project I've developed a desktop application, which fits
I have the following code from a GWT Project that is part of the
As part of my Final Year Project, I need to convert some FORTRAN code
As part of my final year project, I'm designing an Android application that needs
I have this school project I'm making, where I need to make my code
As a part of my final year project, i plan to develop a customized
I have an MSI installer that was built from a VS2010 setup project. Part
So, I have a grad class on artificial intelligence and our final project was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.