Answered step by step
Verified Expert Solution
Question
1 Approved Answer
i need with how the code will look In the AlarmClockController class, find the following line: // TODO: add a data member Replace that line
i need with how the code will look In the AlarmClockController class, find the following line: // TODO: add a data member Replace that line with a statement that declares an Alarmclock instance variable named theclock. Don't forget to make it private. 1 of 7 Now, find the following line in the constructor for AlarmclockController: // TODO: initialize the data member Replace that line with a statement that initializes the data member: a instantiate an AlarmClock object using the no-parameter constructor b. assign that object to the this.theclock data member Write a getter for the theClock data member. We can use Eclipse to help us write this method: a. Right-click your code. From the shortcut menu choose Source > Generate Getters and Setters b. In the resulting dialog, expand the item next to theClock, select getTheClock(), and click Generate. This will give you some code, but we'll need to modify it a little to make it fit with the style that we teach here. c. Add an appropriate method specification: * Gets the AlarmClock object * @precondition none * @postcondition none * @return the AlarmClock object d. Change the code in the return statement so that it says
i need with how the code will look
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered 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