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

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use 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(;
       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;

By purchasing this solution you'll be able to access the following files:

50% discount

$10.50 $5.25
for this solution

or FREE if you
register a new account!

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.

Upload a file
Continue without uploading

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