Question: Java Inheritance Need some help with these 2 parts please.... --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Write Integers to a File This time build a class WriteInts. This class, when
Java Inheritance
Need some help with these 2 parts please....
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Write Integers to a File This time build a class WriteInts. This class, when instantiated, will create a new file and write an array of integers to this new file. All the code to write the data to the file goes in the Constructor.
This code goes in main
int myArr[] = {16, 31, 90, 45, 89};
WriteInts wi = new WriteInts(mydata.dat, myArr);
All other code goes in the constructor.
Read Integers from a File This time build a class ReadInts. This class, when instantiated, will read the integers from the file given, and print them to the Console. All the code to write the data to the file goes in the Constructor.
This code goes in main
ReadInts ri = new ReadInts(mydata.dat);
All other code goes in the constructor.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
