Description
Suppose you are a regional manager of BP credit card company, and you want to develop a simple
JAVA program that managing the remaining balance for each customer.
Write a simple JAVA program following the direction below:
Create a class Balance that
1) has the following (private) instance variables:
– An integer variable for the customer ID;
A double variable for the remaining balance ($).
2) has the following (public) instance methods:
-Constructor method with two arguments: one for the customer ID, one for the remaining balance
($)
A method to set the membership ID;
A method to set the remaining balance (5);
A method to retrieve the customer ID-
A method to retrieve the remaining balance ($);
A method to print customer information:
– Print the customer ID and the remaining balance in one line, in a properly aligned format ( use printh).
Create a class Final that has main method.
In the main method, do the followings:
Define array of 100 Balance objects:
Use a loop to read in data from the file. In each iteration, use nextint) to read in the customer ID
and nextDouble0) to read in the remaining balance: