Answered step by step
Verified Expert Solution
Question
1 Approved Answer
public class ElapsedTime private int hours private in minutes: timelina Overloaded constructor de cinition public ElapsedTinent timeHours, in houra - CineHours: minutes in Mins: Default
public class ElapsedTime private int hours private in minutes: timelina Overloaded constructor de cinition public ElapsedTinent timeHours, in houra - CineHours: minutes in Mins: Default constructor de finition public ElapsedTime this (0 ) Other methods Feedback? PARTICIPATION ACTIVITY ATION 5.8 3: Using the this keyword in member methods and constructors. 1) Write a statement that uses the 'this' keyword to initialize the field minutes to 0. Correct this.minutes = 0; this minutes=0 Assigns the value to the field minutes of the object referred to by the this reference DOO Check Show answer 2) Using the Elapsed Time class declared above, complete the default constructor so that the hours and minutes fields are both initialized to-1 by making a call to the overloaded constructor public elapsedTimeo Check Show
Step 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