Description
Write java program to create two classes Mobile and MobileTest.
Mobile class contains data fields company (e.g. Samsung, Nokia,…etc), model (J1, A1, X1…etc), On (true or false), memory , hasCamera (true or false) and volume(range from 0 -10) and methods two constructors ( one no argument and another with arguments), switchOn(), switchoff(), increaseVolume(), decreaseVolume() and get and set methods for each data fields (getCompany(), setCompany(), getModel(), setModel()……etc)
MobileTest class will contains one method main(). In main method create object of Mobile and write menu driven program to input mobile details, display mobile details, change volume and switch on or off mobile
Special Instructions-
1. Program should be well commented.
2. Program should be easy to use.
3. Use appropriate datatypes for data fields of Mobile class. Data Validation should be done to enter data for Mobile.
4. While increase and decrease volume, necessary check should be done.
5. Either you can write one source file for this assignment or you can upload separate source file for two different classes.
Hint : Please go through lecture video where I have explained TV and TestTV class.




Reviews
There are no reviews yet.