Question: rary > IF 1 2 1 0 : Introduction to Java Technologies home > 7 . 9 : Constructor overloading zyBooks catalog The Student class

rary > IF 1210: Introduction to Java Technologies home >7.9: Constructor overloading
zyBooks catalog
The Student class has a default constructor, a constructor with one parameter, and a constructor with three parameters. Declare the following objects:
student1 with no arguments
student2 with studentName as an argument
student3 with studentName, studentAge, and studentHeight as arguments .
Ex: If the input is Ani 285.00, then the output is:
Student: Undefined, -1,0.00
Student: Ani, -1,0.00
Student: Ani, 28,5.00
Student.java
import java.util.Scaner;
public class Roster {
public static void main(String[] args){
Scanner scnr = new Scanner(
System.in);
String studentName;
int studentAge;
double studentHeight;
studentName =scnr*next();
studentAge =scnr.nextInt();
studentHeight = scnr. nextDouble();
Y* Your code goes here */
student1.print();
student2.print();
2
3
 rary > IF 1210: Introduction to Java Technologies home >7.9: Constructor

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 Databases Questions!