Question: Add method headers to the MessageSender interface. ( o ) Add a method header for a void return method called sendMessage that takes two arguments

Add method headers to the MessageSender interface.(o) Add a method header for a void return method called sendMessage that takes two arguments of type String, one for recipient, and one for message.(p) Add a method header for a void return method called receiveMessage that takes two String arguments, one for sender and one for message.7. Create a Java class file for an abstract class called AbstractCommunicationDevice that implements the MessageSender interface.a) Add an instance variable deviceName to represent the name of the communication device.b) Provide a constructor to initialize the deviceName variable in the abstract class called AbstractCommunicationDevice.c) Implement methods declared in the MessageSender interface. A possible implementation would be to print out information to the console.8. Create another abstract Java class called Smartphone that extends AbstractCommunicationDevice.a) Declare an instance variable batteryLevel to represent the battery level of the smartphone.b) Implement a method checkBatteryLevel() to display the current battery level.c) Implement a parameterized constructor that initializes the device name and battery level of the Smartphone.9. Create a Java class file for the concrete class AndroidPhone that extends Smartphone. It should also implement the interface Mammoth.(q) Implement a parameterized constructor that initializes the device name and battery level of the Android phone. If an appropriate constructor from a superclass is available, override and utilize this constructor.(r) Override the sendMessage(String recipient, String message) method to display a message specific to sending messages from an Android phone.(s) Override the receiveMessage(String sender, String message) method to display a message specific to receiving messages on an Android phone.10. Add code in the main() method of main class file to test your implementation.a) Create an instance of the AndroidPhone class.b) Send and receive messages using the Android phone.c) Display the battery level of the smartphone.d) Your output might look like this:Samsung Galaxy is sending a message to Alice: Lunch today at 12.Samsung Galaxy received a message from Bob: What time is the meeting today?Samsung Galaxy is sending a message to Bob: Meeting at 2:30Battery level: 80%11. Ensure that your code follows good coding practices, including appropriate naming conventions, comments, and indentation.

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 Programming Questions!