Chat with us, powered by LiveChat Suppose you are a regional manager of BP credit card company, and you want to develop a simple - Essayabode

Suppose you are a regional manager of BP credit card company, and you want to develop a simple

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

($)

  • Set the customer ID and the remaining balance ($) to the parameter values;

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:

  • The. Txt file is structured as follows. For simplicity, assume we only have five data points
  • 1001 500
  • 1002 1500
  • 1003 2800
  • 1004 3100
  • 1005 800
  • The first number for each row is the customer ID and the second number for each row is the remaining balance.
  • Instantiate array element by using the constructor method to create a Balance object with customer ID and remaining balance retrieved from the given .txt file for each iteration of while loop;
  • Use a loop to print out all five Balance objects’ information. In each loop iteration, let one array element call the print method.
  • Use a loop to sum of the remaining balance of all five Balance objects.
  • Hint: Use the method declared in Balance class
  • Write the sum of the remaining balance of all five Balance objects (display two decimal places only) into a new file named “output.txt”.
  • Main method may throw exception. However, we do not want to explicitly handle it. In the method header. throw checked exception (do not use try-catch statements).

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?