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. 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. 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
PLEASE DO NOT COPY FROM OTHER SOURCE
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.
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 5 steps with 5 images