Question: Help in Java! Use the array of Student references we went over in lecture to help. Write an Invoice class. The fields for the Invoice

Help in Java!

Use the array of Student references we went over in lecture to help. Write an Invoice class. The fields for the Invoice class for this lab are: String invoiceID String description double amount boolean isPaid The Invoice class you wrote had two constructor methods, a toString( ) method, a compareTo( ) method and an equals( ) method, in addition to the methods set( ) methods for isPaid and amount. Be sure this Invoice class has all of these methods. Create a Driver that has main( ). In main( ) create an array of ten Invoice references reading the data from a file stored in the same directory as your project. The data file is a comma delimited file named invoicedata.txt Use a loop to create the ten Invoice objects and store their addresses in the array. Then, write a separate loop to print the Invoices using the toString( ) method of the Invoice class. The driver then must compare the first Invoice instance to the last Invoice object to determine which has a higher amount due. Then determine if the second and fifth Invoice objects are equal, based on the invoice id using the equals( ) method of the Invoice class. -----------------------------------------------------------------------

invoicedata.txt. :

12323A,repair leaking faucet,23.56,false

14532E,install garbage disposal,398.40,true

34234F,snake tub,89.80,false

43543G,re-route pipe under sink,189.90,true

212343A,install ice maker,235.25,false

323243G,install new water heater,654.50,false

43434F,washing machine hook-up,135.00,true

32354F,fix outside water spout,125.00,true

12123D,new shower head,23.56,false

234354E,fix tub stopper,35.80,true

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Certainly Lets work through this Java assignment stepbystep Were tasked with creating an Invoice class and a Driver program that uses this class with data read from a file Heres how you could approach ... View full answer

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!