Student.java and fills the contents from your main method as follows. class Student{ String name; int ID; t then creates another file called GradStudent.java and fills the contents as follows class GradStudent extends Student String major; boolean thesis; } class Student{ String name; int ID; }

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 1DE
icon
Related questions
Question
Write a Java application called Test.java. Your application creates a file called
Student.java and fills the contents from your main method as follows.
class Student{
String name;
int ID;
}
It then creates another file called GradStudent.java and fills the contents as follows:
class GradStudent extends Student
String major;
boolean thesis;
}
class Student{
String name;
int ID;
But note that all of the following text in GradStudent.java is directly read from
Student.java, i.e., you open Student.java and append the contents to GradStudent.java.
class Student{
String name;
int ID;
Transcribed Image Text:Write a Java application called Test.java. Your application creates a file called Student.java and fills the contents from your main method as follows. class Student{ String name; int ID; } It then creates another file called GradStudent.java and fills the contents as follows: class GradStudent extends Student String major; boolean thesis; } class Student{ String name; int ID; But note that all of the following text in GradStudent.java is directly read from Student.java, i.e., you open Student.java and append the contents to GradStudent.java. class Student{ String name; int ID;
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Developing computer interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT