Write Java program(s) to do the following: 1) Write the data from books.txt as a Serialized file called books.ser to the local Eclipse directory(same as books.txt). 2) Read the books.ser serialized file and output the data on to the Console in the format shown below.
COULD YOU INCLUDE SNAPSHOT OF THE CODE PLEASE
Write Java
1) Write the data from books.txt as a Serialized file called books.ser to the local Eclipse directory(same as books.txt).
2) Read the books.ser serialized file and output the data on to the Console in the format shown below.
NOTE: DO NOT just write out the data from books.txt using System.out.println().
You MUST create the books.ser AND READ the data from the books.ser file and output the data.
We will check that you are creating the SER file and READING that file.
The spacing for the output is: Title(20), Author(20), Year (8) and Price (10.2)
Title and Year are left-justified, Runtime is right-justified.
(You can use your own text file to test your program)
Sample output:
Title Author Year Price
aaaaaaaaaaa bbbbbbbbbbb cccc ddd.dd
...... ...... .....
...... ...... .....
xxxxxxxx sssssssssss xxxx xxx.xx
yyyyyyy nnnnnnnnnnnn yyyy yyy.yy
Trending now
This is a popular solution!
Step by step
Solved in 6 steps with 5 images