Answered step by step
Verified Expert Solution
Question
00
1 Approved Answer
1. Create an Student class, with instance variables studentId (String), name (String) major(String) 2. Create a constructor that initializes all instance variables. Enforce encapsulation and
1. Create an Student class, with instance variables studentId (String), name (String) major(String) 2. Create a constructor that initializes all instance variables. Enforce encapsulation and create getters and setters for all instance variables. 3. Create a toString() method that prints the contents of the object. 4. In your TestStudent class, create 3 students and store them in a file. 5. Read the students from the file and display their name and major.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started