what is the rong

what is the rong

Write a JAVA program to auto-grade exams. For a class of N students, your program should read letter answers (A, B, C, D) for each student. Assume there are 5 questions in the test. Your program should finally print the grade percentage (out of 100%) of each student, and also the class average. Define the exam answer key as Final Array in your program.

i want to know what is the wrong with this program......without changing the style of the code

public class Main {

/**
 * @param args the command line arguments
 */
public static void main(String[] args) {
    double totalpercentage = 0.00;
    double average = 0.00;
    char array[] = { 'a' , 'a' , 'a' , 'a' , 'b' };
    char arr[] = new char[array.length];
    Scanner numofstudents = new Scanner (System.in);
    System.out.println(" Enter number of students ");
    int students = numofstudents.nextInt();



        for ( int i=0; i < students; i++ ){

            for ( int j = i; j <= array.length; j++ ){

            int count = 0;
            arr[j] =(char) Integer.parseInt(JOptionPane.showInputDialog(" enter the answers " + j));

         double percentage =  ( (count /5.0)*100 );
        System.out.println(" Percentage is " + percentage + "%" );

        totalpercentage = totalpercentage + percentage;
            }
        }

        average = totalpercentage / students;
    System.out.println(" class average is " + average + "%");


    }

}
View Answers









Related Tutorials/Questions & Answers:
what is the rong
what is the rong  Write a JAVA program to auto-grade exams. For a class of N students, your program should read letter answers (A, B, C, D) for each... what is the wrong with this program......without changing the style of the code
what is bit
what is bit  what is bit
Advertisements
what is hibernate.archive.autodetection
what is hibernate.archive.autodetection  what is hibernate.archive.autodetection? what is autodetection and why it is used
what is hibernate.archive.autodetection
what is hibernate.archive.autodetection  what is hibernate.archive.autodetection? what is autodetection and why it is used
what is hibernate.archive.autodetection
what is hibernate.archive.autodetection  what is hibernate.archive.autodetection? what is autodetection and why it is used
what is hibernate.archive.autodetection
what is hibernate.archive.autodetection  what is hibernate.archive.autodetection? what is autodetection and why it is used
what is hibernate.archive.autodetection
what is hibernate.archive.autodetection  what is hibernate.archive.autodetection? what is autodetection and why it is used
What is procedure
What is procedure  What is procedure in computers? What are the primary categories of procedures
what is hibernate.archive.autodetection
what is hibernate.archive.autodetection  what is hibernate.archive.autodetection? what is autodetection and why it is used
What is Hibernate
What is Hibernate  Hi, What is Hibernate? Thanks
What is Hibernate
What is Hibernate  Hi, What is Hibernate? Thanks
What is Hibernate
What is Hibernate  Hi, What is Hibernate? Thanks
What is JDBC?
What is JDBC?  What is JDBC
What is FBT
What is FBT   hello, What is FBT
What is ActionServlet?
What is ActionServlet?  What is ActionServlet
What is Trigger?
What is Trigger?  What is Trigger
What is VLR ?
What is VLR ?  hii, What is VLR
What's PHP ?
What's PHP ?  What's PHP
What is an interface?
What is an interface?  What is an interface
What is DML?
What is DML?  What is DML
What is Index?
What is Index?  What is Index
What is SQLLoader?
What is SQLLoader?  What is SQLLoader
What is a "constraint"?
What is a "constraint"?  What is a "constraint
what is Savepoint ?
what is Savepoint ?  what is Savepoint
What is this keyword?
What is this keyword?  What is this keyword
what is collections?
what is collections?  what is collections
what are indices?
what are indices?  what are indices
What is Hibernate
What is Hibernate  Hi, What is Hibernate? Thanks
What is Externalizable?
What is Externalizable?   Hi, What is Externalizable? Thanks
What is the % operator?
What is the % operator?   Hi, What is the % operator? thanks
What is casting?
What is casting?   Hi, What is casting? thanks
What is DataAccessException?
What is DataAccessException?  Hi, What is DataAccessException? thanks
What is IOC ?
What is IOC ?  HI, What is IOC or Dependency Injection? Thanks
What is SQLExceptionTranslator?
What is SQLExceptionTranslator?  Hi, What is SQLExceptionTranslator? Thanks
What are Struts?
What are Struts?  What are Struts? Can anyone explain me what are the Struts framework and what are its uses? Thanks
What is WAP?
What is WAP?  What is WAP?   Hi, Check the tutorial: What is WAP? Thanks
What is SPOOL?
What is SPOOL?  What is SPOOL?   SPOOL command stores output to a file
What is CRM?
What is CRM?  Can anyone tell me What is CRM? Thanks
What is webservices?
What is webservices?  What is web-services and what are the different types of web-services? It would be great if someone explain me the difference between these types of web-services in Java
What is Ajax?
What is Ajax?  Hi, What is Ajax and what is use of Ajax in web programming? Thanks   Hi, Ajax stands for AJAX stands for Asynchronous... JavaScript and other technologies such as CSS and XML. Read more at What is Ajax
What is NSRangeException
What is NSRangeException  Can anyone explain the NSRangeException and the reason why it occurs
What is portal
What is portal  What is portal What is portal and how can i create a portal in Java using components like Java and Java servlet? What are the elements of a portal and how can i create sigle request portal page in Java
What is a tuple?
What is a tuple?  What is a tuple?   hi, A tuple is an instance of data within a relational database.ADS_TO_REPLACE_1 Thanks
What is workflow
What is workflow  hello, What is workflow in RUP?   hi,ADS_TO_REPLACE_1 A workflow is a sequence of activities that produces a result observable value
what is RUP?
what is RUP?  hello, what is RUP??   hii,ADS_TO_REPLACE_1 RUP is stands for Rational Unified Process
What was ENIAC
What was ENIAC  What was ENIAC?   ENIAC was first electronic computer. Full form of ENIAC is Electronic Numerical Integrator And Computer
what is posting?
what is posting?  what is posting?   Posting is an event that writes Inserts, Updates & Deletes in the forms to the database but not committing these transactions to the database
What is an Iterator?
What is an Iterator?  Hi, What is an Iterator? Please help me. Thanks   Hi, I have find good reference website for the What is iterator? In this programming tutorial it explain how to use the iterator interface
What is WSP?
What is WSP?  hii, What is WSP?   hello,,ADS_TO_REPLACE_1 Wireless Session Protocol (WSP) implements session services of WAP. Sessions can be connection-oriented and connectionless and they may be suspended
What is CDPD ?
What is CDPD ?  Hello, What is CDPD ?   hii,ADS_TO_REPLACE_1 Cellular Digital Packet Data (CDPD) is an open standard for supporting wireless Internet access from cellular devices

Ads