Question: Exercise 2: 1. Using the Cellphone class in Lab 3, add a static member to the class Cellphone called noOfCellphones (int). Add a static getter

 Exercise 2: 1. Using the Cellphone class in Lab 3, add
a static member to the class Cellphone called noOfCellphones (int). Add a

Exercise 2: 1. Using the Cellphone class in Lab 3, add a static member to the class Cellphone called noOfCellphones (int). Add a static getter and setter to the class for the new attribute, Increment this attribute in each constructor of the class. 2. Add a Copy Constructor to the Cellphone class. 3. Develop a GUI for the class Cellphone as shown below. 4. Create an array of Cellphones. Call it allPhones with sizes 10 5. The Add button should add another cell phone to the table by creating a new Cell Phone Obiects (Hint: Use the split() method of the String class). Add the cellphone object to the all allPhones array 6. The Load button opens the input file, reads line by line, creates an object of type CellPhone, add it to the al Phones array, then updates the table. 7. The Copy button should copy the selected cell phone and make a new one using the copy constructor. The new phone should be added to the allPhones array. B. The neofCell Phones should be undated after each creation of a Cellphone object and adding this phone to the table and the array, it should be the same as the allPhones array length 9. The Save button should take all phones in the allPhone array, and save it to the output file using the toString() method of each phone. 10. You should handle any possible exception in your application and testit before you submit. Add Design Preview IcelphoneFrame) New Phone Noka; 2012; 100; 1:1000 tout le Blectronics.but Output fie: Electronics, out Load Total Number of Col Phones 1 brand Cameras Yen 2012 Memory 100 Price 1000.0 SK Design Preview CellphoneFrame) New Phone Nokia:2012: 100; 1; 1000 Add Trout File: Electronics.but Lond Output File: Bectronics out Save Total Number of Cell Phones Copy 6 Cameras Cameras Brand Nokia Android Phone Huawe Android Phone Year 2012 2020 2019 2018 2020 2019 Memory 100 1400 360 380 350 360 Price 1000.0 3000.0 2000.0 2500.0 2200.0 2000.0 2. 3 Status OK

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!