Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Assume the existence of a Phone class with a constructor that accepts two parame

ID: 3642922 • Letter: A

Question

Assume the existence of a Phone class with a constructor that accepts two parameters: a string for the phone number followed by a boolean representing whether the phone provides added-value services. Assume a derived class MP3Phone has been defined that has two data members: an integer, memorySize, for the size, in megabytes of the phone memory, and a boolean, playsAAC, representing whether the phone is capable of playing AAC-encoded audio files. Write a constructor for MP3Phone that accepts three parameters: a string for the phone number (which is passed up to the Phone constructor, together with the value true for the added-value boolean), and an integer followed by a boolean for the data members of the MP3Phone class..

Explanation / Answer

MP3Phone(String phoneNumber, int memorySize, boolean playsAAC) { super(phoneNumber, true); this.memorySize = memorySize; this.playsAAC = playsAAC;}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote