You are not logged in. Please login at www.codechef.com to post your questions!

×

Create a Java program that will compute for the subject grade of a student based on the specification stated below

String [ ][ ] student= {{“Francis M. Reyes”,”92”,”89”,”93”,”94”},{“Joseph E. Estrada”,”80”,”70”,”81”,”78”},{“Ferdinand E. Marcos”,”77”,”93”,”83”,”90”},{“Cory C. Aquino”,”78”,”73”,”70”,”70”},{“Emilio A. Aguinaldo”,”78”,”86”,”78”,”80”},{“Ramon M. Magsaysay”,”91”,”81”,’’78”,”80”},{“Gloria M.Arroyo”,”84”,”74”,’’94”,”88”}};

Given the String array student having the initialization shown on the table above get the following:

GWA-General Weighted Average

Name of the student who obtained the highest GWA

Name of the student who obtained the lowest GWA

GWA=Prelim Grade 20% + Midterm Grade 20 % + Pre-final Grade 20% + Final Grade 40%

Name of the student who obtained the highest Prelim Grade

Name of the student who obtained the highest Midterm Grade

Name of the student who obtained the highest Pre-final Grade

Name of the student who obtained the highest Final Grade

Names of passing students (GWA>=75)

Names of failing students (GWA<75)

SAMPLE OUTPUT:

Francis M. Reyes GWA: 92.4

Joseph E. Estrada GWA: 77.4

Ferdinand E. Marcos GWA: 86.6

Cory C. Aquino GWA: 72.2

Emilio A. Aguinaldo GWA: 80.4

Ramon M. Magsaysay GWA: 82

Gloria M. Arroyo GWA: 85.6

Student with highest GWA: Francis M. Reyes

Student with Lowest GWA: Cory C. Aquino

Student with Highest Prelim Grade: Francis M. Reyes

Student with Highest Midterm Grade: Ferdinand E. Marcos

Student with Highest Pre-final Grade: Gloria M. Arroyo

Student with Highest Final Grade: Francis M. Reyes

List of Passing Students:

Francis M. Reyes

Joseph E. Estrada

Ferdinand E. Marcos

Emilio A. Aguinaldo

Ramon M. Magsaysay

Gloria M. Arroyo

List of Failing Students:

Cory C. Aquino

asked 17 Feb '13, 12:49

etcheng04's gravatar image

0★etcheng04
-1348
accept rate: 0%

edited 17 Feb '13, 18:42


GWA = General Waited Average? you mean the average that is waiting for someone, generally? ROFL! General Weighted Average, it should be.

link

answered 17 Feb '13, 15:05

bugkiller's gravatar image

3★bugkiller
8.6k194898
accept rate: 9%

yeah im sorry.. it should be like that

(17 Feb '13, 18:41) etcheng040★

What a great information you shared with us, I am inspired by the method for the stage. It kept joined me regularly. Keep doing awesome. Thanks for sharing this blog article. Online help with assignment

link

answered 15 Jun '16, 15:32

ordervenue's gravatar image

0★ordervenue
1
accept rate: 0%

I am a writer. Your code and its meaning are interesting. I think in remembering the recipe it is very useful.I am interested the shared document. As a writer I doing a work about this topic.

Best custom essay writing service

link

answered 25 Jul '16, 12:55

soniyaphilip's gravatar image

0★soniyaphilip
-1
accept rate: 0%

Most importantly admire your offer, similar to your site, the trust can impart to you more magnificent blog and Thanks for such post and keep it up.best essay writing service has made a decent showing here to put all the data substance and data at one spot.

link

answered 16 Aug '16, 17:27

janywatson's gravatar image

0★janywatson
1
accept rate: 0%

I think it is too bulky. it needs a detailed ideas before coding. So please share for all. This is unclear and not sufficient. Or if you want to code for this, please ask help from buy custom essays online. They have a section for developing project.

link

answered 20 Aug '16, 14:20

stephenjenny42's gravatar image

0★stephenjenny42
1
accept rate: 0%

This idea is of great deal. This will really enhance the power of coding and it looks great. java is a simple programming language to complete this coding we need more resources and details so as to complete the programme to bring out the result. I best essay writing service will help you to complete this if you provide more data.

link

answered 20 Aug '16, 16:33

bestessay's gravatar image

0★bestessay
1
accept rate: 0%

I think it need a lengthy code. Java code is simpler than any other programming languages. For this given specification of students subject grade can be coded with the help of structures. It will simplify your code. If any doubt in coding you can refer buy research proposal. They have separate section for java programs.

link

answered 20 Aug '16, 17:02

teenamariya's gravatar image

0★teenamariya
1
accept rate: 0%

Immediately that great to most of that Knowledge is the put away about substances for conditions, conditions, and positions. This message all levels that can be recognized and saw, so generally the outside that can be seen. Presently I write my coursework for me work after that I will say more in regards to learning and will impart to you.

link

answered 28 Sep '16, 17:17

davidsharp1's gravatar image

0★davidsharp1
1
accept rate: 0%

It is very intelligent solution to this task I want to write a program that can Buy Assignment Online in cheap prices maybe I develop some app in java.

link

answered 14 Oct '16, 13:36

aliciacalder_2's gravatar image

0★aliciacalder_2
1
accept rate: 0%

Great Information and would love to know more about this. Thanks ..sanat palia

link

answered 15 Oct '16, 13:11

sanatpalia1's gravatar image

0★sanatpalia1
11
accept rate: 0%

Great Information and would love to know more about this. Thanks ..sanat palia

link

answered 15 Oct '16, 13:12

sanatpalia1's gravatar image

0★sanatpalia1
11
accept rate: 0%

public class Student {

public static void main(String[] args) {
    // TODO Auto-generated method stub
     double  GWT[] = new double[7];
     int pre[] = new int[7];
     int mid[] = new int[7];
     int pf[]  =new int[7];
     int fn[]  = new int[7];
    String [ ][ ] student= {{"Francis M. Reyes","92","89","93","94"},
                            {"Joseph E. Estrada","80","70","81","78"},
                            {"Ferdinand E. Marcos","77","93","83","90"},
                            {"Cory C. Aquino","78","73","70","70"},
                            {"Emilio A. Aguinaldo","78","86","78","80"},
                            {"Ramon M. Magsaysay","91","81","78","80"},
                            {"Gloria M.Arroyo","84","74","94","88"}};
    double h=0;
    int a=0;
    int b=0;
    int c=0;
    int d=0;
    String pe =null;
    String me = null;
    String pfe = null;
    String fe =null;

    double l=1000.00;
    String high=null;
    String low=null;
    for(int i=0 ;i<7;i++)
    {
        GWT[i]=0;

int k =0;
        for(int j=0;j<5;j++)
        {

            if(j==0)
            {
                System.out.print(student[i][j]+" "+":");
            }
            else if(j>0 && j<4)
            {
                //System.out.println(i);
            if(j==1)
            {
                pre[i]=Integer.parseInt(student[i][j]);
                if(a<pre[i])
                {
                    a=pre[i];
                    pe = student[i][0];

                }
            }
            else if(j==2)
            {
                mid[i] =Integer.parseInt(student[i][j]);
                if(b<mid[i])
                {
                    b=mid[i];
                    me=student[i][0];
                }
            }
            else if(j==3)
            {

                pf[i]=Integer.parseInt(student[i][j]);
                if(c<pf[i])
                {
                    c=pf[i];
                    pfe=student[i][0];
                }
            }

                GWT[i] = (GWT[i]+(20.0/100.0)*(float)Integer.parseInt(student[i][j]));

        }
            else
            {
                fn[i] = Integer.parseInt(student[i][j]);
                if(d<fn[i])
                {
                    d=fn[i];
                    fe=student[i][0];
                }

            GWT[i]= (GWT[i]+(40.00/100.00)*(float)Integer.parseInt(student[i][j]));
            }

        }
            if(h<GWT[i])
            {
                h=GWT[i];

                high = student[i][0];
                }

if(l>GWT[i]) {
l=GWT[i]; low = student[i][0]; }

    System.out.println(GWT[i]);

}


    System.out.println("Student with highest GWA :"+" "+high);
    System.out.println("Student with lowest GWA :"+" "+low);
    System.out.println("student with Highest Prelim Grade :"+" "+pe);
    System.out.println("student with Highest Midterm Grade: "+" "+me);
    System.out.println("student with Highest Pre-final Grade: "+" "+pfe);
    System.out.println("student with Highest Final Grade: "+" "+fe);
    System.out.println("List of Passing Students");
    for(int k =0;k<7;k++)
    {

        if(GWT[k]>=75.00)
        {
            System.out.println(student[k][0]);
        }
    }
    System.out.println("List of failed Students");
    for(int m=0;m<7;m++)
    {
    if(GWT[m]<75)
    {
        System.out.println(student[m][0]);
    }
    }

} }

link

answered 26 Oct '16, 04:17

vinyasa1994's gravatar image

0★vinyasa1994
1
accept rate: 0%

Not bad, except for Cory C. Aquino, of course! Here's Resumes.Expert review my friends recommended me when I've been searching for a reliable resume writing service. It is very important for every graduate student to compose a perfect resume to get a job of his/her dream.

link

answered 27 Oct '16, 18:16

fernleyba's gravatar image

0★fernleyba
1
accept rate: 0%

If you are game addictive then you can get free vip on msp without any technical language and coding on your gaming device.

link

answered 15 Jan, 14:30

akshat00581's gravatar image

0★akshat00581
1
accept rate: 0%

SSLC Results 2017 Kerala is going to release this April at keralaresults.nic.in

link

answered 24 Mar, 13:08

keralaresults's gravatar image

0★keralaresults
1
accept rate: 0%

Finally, I discovered something useful for my paper to write about. that is fascinating and helps me with more research in the future.

link

answered 06 Apr, 01:05

johnwoo's gravatar image

0★johnwoo
1
accept rate: 0%

A grade is not actually the precise performance of students' skills. Now and then, there are some external random factors might influence your success in a particular subject. Being busy with other staff of you social life, there is not say that you are bad at this class because you have got a bad grade. By taking something off your shoulders, here are some tips on how ro create a thesis paper you can take advantage of.

link

answered 17 Apr, 13:11

jeff_123's gravatar image

0★jeff_123
1
accept rate: 0%

I think it require an extensive code. Java code is less complex than some other programming dialects. For this given particular of understudies subject review can be coded with the assistance of structures.

Assignment Writing | Assignment Writing Service UK

link

answered 21 Apr, 12:09

morgan01's gravatar image

0★morgan01
1
accept rate: 0%

It's far very clever solution to this venture I need to write down a software that should buy mission online in cheap costs maybe I increase some app in Java. https://www.okdeal.pk/okdeal.pk

link

answered 29 May, 16:48

jcovington21's gravatar image

0★jcovington21
1
accept rate: 0%

When you accumulate adequate roblox hack tix you could trade them for robux in Roblox industry.

link

answered 28 Jun, 17:30

codesjunction's gravatar image

0★codesjunction
1
accept rate: 0%

It's far very clever solution to this venture I need to write down a software that should buy mission online in cheap costs maybe I increase some app in Java.

write me an assignment | buy assignment

link

answered 28 Jul, 17:13

topassignmenth's gravatar image

0★topassignmenth
1
accept rate: 0%

-3

Are you an enthusiastic movies lover then watch latest movies online here free movie websites

link

answered 22 Jul '16, 17:57

sandeepgala's gravatar image

0★sandeepgala
-5
accept rate: 0%

toggle preview
Preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:

×1,064

question asked: 17 Feb '13, 12:49

question was seen: 10,391 times

last updated: 28 Jul, 17:13