Credit card system assignment

computer science

Description

Data fields:

Create the following fields in your class.

accountNumber – Credit card number – a nine digit number (use int)

customerName - Customer’s name – a String

accountBalance - Account balance – a floating point number

Methods:

Create an accessor method and mutator method for each of the data fields.

Create a method called accountCharge() that defines a double parameter.

This method will increase the account balance by the amount sent to this method.

However, if the amount to be charged is greater than 5000, print a message to

standard output indicating that the maximum charge is $5000 and do not add this

amount to the account balance.

Create a method called account Payment() that defines a double parameter.

This method will decrease the account balance by the amount sent to this method.

However, if the amount to be paid is more than the balance, print a message to

standard output indicating that this value exceeds the balance and do not subtract

this amount from the account balance.

Create a method called printBalance() that prints the account balance to

standard output.

Create a default no argument constructor for the CreditCard class. Set the numeric

values to 0 and the String variable to null.


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.