Question: Another StudentGiven the Student class, do the following: Instantiate the two ( 2 ) Students with the following variable name & data: - student 1

Another StudentGiven the Student class, do the following:
Instantiate the two (2) Students with the following variable name & data:- student1 with: "John", "Smith", and 85.50- student2 with: "Jane", "Smith", and 92.30
Print out the student information for both Students
import java.io.*;
import java.util.*;
public class CodingQuestion {
public static class Student {
private String firstName;
private String lastName;
private double gradePercentage;
public Student(String firstName, String lastName, double gradePercentage){
this.firstName = firstName;
this.lastName = lastName;
this.gradePercentage = gradePercentage;
}
public void displayInfo(){
System.out.printf("%s %s has a grade percentage of %.2f%%.%n", firstName, lastName, gradePercentage);
}
}// end of Student class
public static void main(String[] args){
/***** DO NOT CHANGE THE CODE ABOVE THIS LINE *****/
//WRITE YOUR CODE HERE
}// end of main()
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!