Answer the number base on the program

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Answer the number base on the program

public class Student {
private String idNumber;
private String name;
private String program;
private int year;
private double units;
private Course courseE;
public Course getCourseE() {return courseE; }
public void setcourseE(Course courseE) {this.courseE = courseE; }
þublic String getIdNumber() {return idNumber;}
public void setIdNumber(String idNumber) {this.idNumber = idNumber;}
public String getName() {return name;}
public void setName(String name) {this.name - name; }
public String getProgram() {return program; }
public void setPrograam(String p) {this.program p; }
public int getYear() {return year; }
public void setYear(int year) {this.year - year;}
public double getunits() {return units;}
public void setUnits(double units) {this.units = units; }
public double computeTF() { return units*350;}
Transcribed Image Text:public class Student { private String idNumber; private String name; private String program; private int year; private double units; private Course courseE; public Course getCourseE() {return courseE; } public void setcourseE(Course courseE) {this.courseE = courseE; } þublic String getIdNumber() {return idNumber;} public void setIdNumber(String idNumber) {this.idNumber = idNumber;} public String getName() {return name;} public void setName(String name) {this.name - name; } public String getProgram() {return program; } public void setPrograam(String p) {this.program p; } public int getYear() {return year; } public void setYear(int year) {this.year - year;} public double getunits() {return units;} public void setUnits(double units) {this.units = units; } public double computeTF() { return units*350;}
The Program
public class Teststudent {
public static void main(String a[])
{
Scanner input = new Scanner (System.in);
//create object st1
Student st1 = new (1);
//input the id Number of student st1
stil. (2)(input.next());
//display the Id number of st1
System.out.print(st1.(3));
//create an array of 3 students
Student[] st = new (4);
7/initialize the object at index e of this array
(5) = new (6);
//assign 2 as year of the student at index e
st[0].(7);
T/display the tuitionfee of the student at index 0
System.out.print(st[@].(8));
}
}
Transcribed Image Text:The Program public class Teststudent { public static void main(String a[]) { Scanner input = new Scanner (System.in); //create object st1 Student st1 = new (1); //input the id Number of student st1 stil. (2)(input.next()); //display the Id number of st1 System.out.print(st1.(3)); //create an array of 3 students Student[] st = new (4); 7/initialize the object at index e of this array (5) = new (6); //assign 2 as year of the student at index e st[0].(7); T/display the tuitionfee of the student at index 0 System.out.print(st[@].(8)); } }
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY