Question: Object Instantiation using the Student Class Given the following Student Class declaration: Instantiate a Student Object using the already declared and initialized variables inputFirstName, inputLastName
Object Instantiation using the Student Class
Given the following Student Class declaration:
Instantiate a Student Object using the already declared and initialized variables inputFirstName, inputLastName and inputStudentID using the Student constructor.
Call the already created describe method on your Student object.
import java.util.Scanner;
public class CodingQuestion
public static class Student
private String firstName;
private String lastName;
private int studentID;
public StudentString firstName, String lastName, int studentID
this.firstName firstName;
this.lastName lastName;
this.studentID studentID;
public void describe
System.out.printlnFirst Name: this.firstName Last Name: this.lastName Student ID: this.studentID;
end of Student class
public static void mainString args
Scanner in new ScannerSystemin;
String inputFirstName innextLine;
String inputLastName innextLine;
int inputStudentID innextInt;
ADD your code below this line
ADD your code above this line
inclose;
end of main
end of CodingQuestion class
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
