QuestionQuestion

1. Define a class Student which extends Person. It adds the attributes:

Int Test1, test2, test3
Double average
String grade

It has methods computeaverage() and calculategrade().
The grades are based on the average, with above 90 an A, 80 to 90 a B, 70 to 80 a C etc.
All other attributes have a set and a get.

2. Write an application that uses an array of type student of size 20.
The array prompts the user to enter some students and the calculates their grades and prints out the list of students and their grades.

Solution PreviewSolution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

import java.util.Arrays;
import java.util.Scanner;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;

/**
*
* @author
*/
public class JavaApplication13 {

    /**
    * @param args the command line arguments
    */
    public static void main(String[] args) {
       // TODO code application logic here
       Student [] studentArray = new Student[20];
      // System.out.println("Enter the number of student, the number must be less than 21");
       // get input from keyborad
       Scanner scan = new Scanner(System.in);
       int numberOfStudent;
       //numberOfStudent = scan.nextInt();
       numberOfStudent = Integer.parseInt(JOptionPane.showInputDialog("Enter the number of student, the number must be less than 21"));
       // System.out.println("Enter the information in this form : \n FirstName LastName Test1 Test2 Test3");
      
       if (numberOfStudent > 20) {
            numberOfStudent = 20;
       }...
$12.00 for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

Find A Tutor

View available Java Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.

Decision:
Upload a file
Continue without uploading

SUBMIT YOUR HOMEWORK
We couldn't find that subject.
Please select the best match from the list below.

We'll send you an email right away. If it's not in your inbox, check your spam folder.

  • 1
  • 2
  • 3
Live Chats