JAVA Homework
Description
1. Create a class CellPhone with following fields: (see AccountRecord.java)
String model, manufacturer, double retailPrice
Add Constructors, Accessors and Mutators.
2. Create another class CellPhoneList to store Cellphone objects in an
ArrayList. This class can be used to serialize cellphones into an XML file.(see
AccountRecords.java)
3. Create a program CellPhoneStoreApp.java (see Lab_5_Help.java) with
menu options as shown below:
Unformatted Attachment Preview
Please download, run, and understand
Lab_5_Help program before you start this lab
1. Create a class CellPhone with following fields: (see AccountRecord.java)
String model, manufacturer, double retailPrice
Add Constructors, Accessors and Mutators.
2. Create another class CellPhoneList to store Cellphone objects in an
ArrayList. This class can be used to serialize cellphones into an XML file.(see
AccountRecords.java)
3. Create a program CellPhoneStoreApp.java (see Lab_5_Help.java) with
menu options as shown below:
Sample Run
——–Menu Selections——1 – Create cell phones and write in text file
2 – Display cell phones from text file
3 – Create cell phones and write in xml file
4 – Display cell phones from xml file
5 – Exit
?1
Creating cellphone objects and write into txt file…
cellphone list stored in txt file.
——–Menu Selections——1 – Create cell phones and write in text file
2 – Display cell phones from text file
3 – Create cell phones and write in xml file
4 – Display cell phones from xml file
5 – Exit
?2
Reading cellphone list from txt file
Model
Manufacturer
retail price
Pixel1
11
Apple
499.99
13
Apple
1009.99
S21
SamSung
600.00
Xperia
Sony
614.22
899.99
——–Menu Selections——1 – Create cell phones and write in text file
2 – Display cell phones from text file
3 – Create cell phones and write in xml file
4 – Display cell phones from xml file
5 – Exit
?3
creating cellphone objects and store in XML file…
cellphone list stored in XML file.
——–Menu Selections——1 – Create cell phones and write in text file
2 – Display cell phones from text file
3 – Create cell phones and write in xml file
4 – Display cell phones from xml file
5 – Exit
?4
Reading cell phone list from XML file…
Model
Manufacturer
Pixel 6
retail price
899.99
iPhone 11 Pro
Apple
499.99
iPhone 13 Pro
Apple
1009.99
Galaxy S21 5G
SamSung
Sony Xperia 5 III Sony
600.00
614.22
——–Menu Selections——1 – Create cell phones and write in text file
2 – Display cell phones from text file
3 – Create cell phones and write in xml file
4 – Display cell phones from xml file
5 – Exit
?5
Good Bye!
Resource:
Sample Program (Lab_5_Help)
In-class demo Lab 5 Help
Deliverables:
ellPhone.java (20%)
ellPhoneList.java (10 %)
ellPhoneStoreApp.java (40%)
creenshot (30%)
Note: If you have any problem with jdk 1.8 installation in order to get
import javax.xml.bind.JAXB working, don worry menu selections 3 and
4 are optional.
Note: Sparingly comment your java source code, save all the files in
your_lastname_lab_5 folder, zip it, and upload for grading.
Thank you!
Purchase answer to see full
attachment
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."