Object Oriented Development with Java (CT038-3-2) Object IO
Lab 10 –Object Input/Output
Answer the following questions.
Exercise:
1. Write a program to create a file named [Link] if it does not exist. If it exists,
append new data to it. Write one hundred integers created randomly into the file using
binary I/O.
2. Suppose a binary data file created in Q1 ([Link]). Write a program to find the
total of integers.
3. Write a program that stores an array of five int values 1, 2, 3, 4, and 5, a Date
object for current time, and the double value 5.5 into the file named [Link].
4. Given a [Link] class. Rewrite the Loan class to implement Serializable.
Write a program that creates five Loan objects and stores them in a file named
[Link].
Level 2 Asia Pacific University of Technology and Innovation Page 1 of 1