Chapter 14: Problem 4
Complete the following tasks, assuming that each applies to the same program: a) Write a statement that opens file "oldmast.ser" for input-use objectInputstream variable in01dMaster to wrap a FileInputStream object. b) Write a statement that opens file "trans.ser" for input-use ObjectInputStream variable inTransaction to wrap a FileInputStream object. c) Write a statement that opens file "newmast.ser" for output (and creation)-use \(0 \mathrm{b}-\) ject0utputStream variable outNewMaster to wrap a File0utputStream. d) Write a statement that reads a record from the file "oldmast.ser". The record is an object of class AccountRecordSerializable- use ObjectInputStream variable in01dMaster. Assume class AccountRecordSerializable is the same as the AccountRecordSerializable class in Fig. 14.17 e) Write a statement that reads a record from the file "trans.ser". The record is an object of class TransactionRecord - use ObjectInputStream variable inTransaction. f) Write a statement that outputs a record to the file "newmast.ser". The record is an object of type AccountRecordSerializable-use Object0utputStream variable outNewMaster.
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.