Question: Write a Program to define a Mobile class, with member variables String brand; double price ( Should be non negative and greater than zero throw

Write a Program to define a Mobile class, with member variables

  • String brand;
  • double price ( Should be non negative and greater than zero throw exception otherwise)
  • String OS (make it Final).
  • Float memory
  1. Make a default constructor,
  2. Make a parameterized constructor.
  3. Overload the above Constructor.
  4. Provide getters and setters for data members.

Create another class mobile store that holds an arrayList of mobiles in the store note that it cannot have more than 3 mobiles of same brand.

  • Provide appropriate methods also write method to save mobiles data to file ( Make sure if number of mobiles of one brands exceeds 3 it should throw an exception). And read from file.
    1. Design an application using JFrames which help adding new mobiles to the store.
    2. Buy a Mobile.( this should calculate and display bill plus receipt to user)
    3. Update a mobiles Data.
    4. Delete a mobile.
    5. View All mobiles

Note you can add member variables and method as per need.You have to do it in java

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!