Question: Java Given the following two classes , CreditInfo and CreditInfo Tester. The CreditInfoTester reads in a credit card number from a locates the credit card
Given the following two classes , CreditInfo and CreditInfo Tester. The CreditInfoTester reads in a credit card number from a locates the credit card number in a binary random access file called credit.dat. The Creditinfo Tester also creates a tinfo object and uses the CreditInfo object to print out the credit card number and the credit limit. Write the CreditinfoReader class include instance variables, constructor and methods needed to make CreditinfoTester compile Credi and run and use CreditInfo correctly. Assume that the file credit.dat exists and has data in the correct format. You may add any additional methods to the CreditInfoReader as you feel are needed but you cannot modify the CreditinfoTester or the Creditinfo classes. No import statements or javadoc required. (NOTE: all the code below compiles and runs correctly, however space saving measures were taken for presentation on the exam) public class Creditinfo private int creditCardNumi private double creditLimit: public CreditInfof int aCreditCardNum, double aCreditLimit) ( creditCardNum = aCreditCardNum; creditLimit aCreditlimit: public int getCreditCardNum)f return creditCardNums public double getCredtLimitOf return creditlimit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
