Answered step by step
Verified Expert Solution
Question
1 Approved Answer
*JAVA PROGRAMMING* Write a Smart Phone class to represent your company's new smart phone. Your smartPhone will include some information about the phone as well
*JAVA PROGRAMMING*
Write a Smart Phone class to represent your company's new smart phone. Your smartPhone will include some information about the phone as well as your music library. You can use your SongUpgrade class from Unit 3 in this project. This can be done by copying the song.java file into your SmartPhone folder. Class SmartPhone should include the following: a. an instance variable for its brand, b. an instance variable for its memory capacity (in GB), c. an instance variable of type array that can hold 4 SongUpgrade objects called "songLibrary" that will store the songs in the Smart Phone, d. a two-argument constructor to initialize the instance variables brand and memory Capacity. You can hard code the songLibrary in the constructor with four songs of your choice in the two-argument constructor. e. a method called "totalPlayTime()" that will return an integer for the total number of seconds for all songs stored in the songLibrary. f. a method called "deleteAllSongs()" that will remove all songs from memory by placing "null" into each element in the array. g. a toString() method to display the object's three instance variables (including songLibary) in a user-friendly formatStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started