The assignment is organized according to the following sections: (A) Objective, (B) Description, (C) Evaluation, and (D) Submission.
A. Objective
The assignment goal is to develop a program in Java that computes your most regular
monthly expenses.
B. Description
The program should include 2 classes, Expense.java and MyExpenses.java, inside a
package called expenses.
B.1 Expense Class Implement Expense class inside a package called expenses that contains:
• A private String data field serviceType, e.g. “Electricity”, “Gas”, etc.
• A private String data field billDate, e.g. “Jan 4 2021”.
• A private double (or Double) data field billAmount, e.g. 25.00.
• A private String data field dueDate, e.g. “Jan 30 2021”.
• A private String data field paymentDate ,e.g. “Jan 20 2021”.
• A private String data field paymentForm, e.g. “Credit Card”, “Check”, etc.
• A private String data field paymentRefNumber, e.g. “123456”, etc. (Do not use your real reference information. The number may be composed of year, month, day, and any additional number, e.g. “20210101-9”)
• A private double (or Double) data field named paymentAmount, e.g. 10.00.
• A private double (or Double) data field named balanceAmount, computing the difference between the billAmount and the paymentAmount for the expense.
• Methods that set and return the values for each variable. Note that for balanceAmount there should only be a “get” method, and not a “set” method.
• A constructor method receiving all the arguments required to create each expense.
• A print method printing the values of all variables in the class.
Get Free Quote!
282 Experts Online