Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

4 How can you create a better online image for yourself?

Answered: 1 week ago