Answered step by step
Verified Expert Solution
Question
1 Approved Answer
> IStudentsvc +writeToFile(Student):void +readFromFile():void Student -id Number: int -firstName: String -middilelntital: char -lastName: String +constructors() +getters() +setters() +display() Implements IStudentSvclmpl +writeToFile(Student):void +readFromFile():Student 1) Implement each
> IStudentsvc +writeToFile(Student):void +readFromFile():void Student -id Number: int -firstName: String -middilelntital: char -lastName: String +constructors() +getters() +setters() +display() Implements IStudentSvclmpl +writeToFile(Student):void +readFromFile():Student 1) Implement each of the classes in the UML diagrams above; ensure that primary constructors, setters and getters are included. The display() method in the Student class must display all the attributes of the class. (5 Marks) The writeToFile method should accept a Student object and save it to a file called students.dat. After a successful write, the message "object successfully saved should be displayed (15 Marks). The read FromFile method should read and return the Student object read from the file created above. The object returned should be displayed in main (15 Marks) 2) Include the necessary exception handling for file I/O in each method. (10 Marks) 3) In the main method to test the functionality of the application by creating objects and calling the writeToFile and readFromFile methods
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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