NEED A PERFECT PAPER? PLACE YOUR FIRST ORDER AND SAVE 15% USING COUPON:

homework help 4263

1) I need to create a class, named ReadProduct.java. It has the following two attributes:

• an ArrayList object, listProduct, which will contain Product objects and

• a HashMap object, mapCodeProduct, in which the key is product code, and the value is the product object.

2) The class has a method, readProductFile(), that reads products.txt line by line(refer to chapter 18 for the text file’s format and sample content). Using information from each line, it creates a Product object and stores the object in the listProduct ArrayList. This class contains another method, getListProduct(), which returns the listProduct ArrayList object.

3) When reading each line, it stores the product code and the product object as a record to the mapCodeProduct HashMap object. It provides another method, getMapCodeProduct(), which returns the mapCodeProduct HashMap object.

4) I need to create another class, ProductApp.java, which has a main method to test the ReadProduct class.

5) Products.txt file would be comma-separated text file. Each row represents one product as follows:

Wuth,Wuthering Heights,49.50

Mbdk, Moby Dick,33.67

Wooz,Wizard of Oz, 44.29

Solution:

15% off for this assignment.

Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!

Why US?

100% Confidentiality

Information about customers is confidential and never disclosed to third parties.

Timely Delivery

No missed deadlines – 97% of assignments are completed in time.

Original Writing

We complete all papers from scratch. You can get a plagiarism report.

Money Back

If you are convinced that our writer has not followed your requirements, feel free to ask for a refund.

× How can I help you?