What's new

Pa help java code

Captcha-Google

Forum Veteran
Elite
Joined
Apr 29, 2017
Posts
943
Reaction
634
Points
530

Create a Superclass named MobilePhone with fields: brand, model, color,and price, and a class variable mPhoneCount. It should have 2 constructors: a default and one with all fields as parameters. Create the necessary accessors, mutators, and class method. It should have a method that will display everything with labels.
Create a Subclass named SmartPhone with a field: cameraPixels. It should have 2 constructors: a default and one with all fields as parameters, inheriting all fields from the superclass. Declare the necessary accessors and mutators, and override the method you created from the superclass that will display everything with labels.
Create a main class named PhoneStore and create 2 objects per class (superclass and subclass) per constructor. Assign values either automatically, using input dialog boxes, or input files and display values of all variables on the General Output window, Dialog Boxes, or Output file.​

 

Similar threads

Back
Top