Question: Java.1 Implement Expense class inside a package called expenses that contains: A private String data field serviceType, i.e. Electricity, Gas, etc. A private String data

Java.1 Implement Expense class inside a package called expenses that contains:

A private String data field serviceType, i.e. Electricity, Gas, etc.

A private String data field billDate, i.e. Jan 4 2017.

A private double data field billAmount, i.e. 25.00.

A private String data field dueDate, i.e.Jan 30 2017.

A private String data field paymentDate,i.e.Jan 20 2017.

A private String data field paymentForm, i.e. Credit Card, Check, etc.

A private String data field paymentRefNumber, i.e. 123456, etc.

A private double data field named paymentAmount,i.e. 5.00.

A private 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.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!