CSC1020 Homework 2
Overview
We are going to write a program that will write the same data in three different ways: by writing the data as text, by writing the data as individual data types, and by writing the data as a single Object. To verify that we successfully stored the data, we will then read all three files back into memory and print out the values. The three values we will work with are:
57 4.876 I am Mr. Data
Details
- The text file will be called
data.txt
- The file containing separate data types will be called
data.bin
- The file containing an
Object
will be calledobject.bin
- The files will be stored in a folder called
data
that will be located in the root of the project - You will use helper methods to do the reading and writing (see UML)
- The output will be the three values on a single line, separated by spaces, so when finished, your output should look like:
57 4.876 I am Mr. Data 57 4.876 I am Mr. Data 57 4.876 I am Mr. Data