Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

> 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions

Question

7. How might you go about testing these assumptions?

Answered: 1 week ago