Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Convert this Java code to c# The main should look like this.... Step 1 of 4 A Time class declaration with overloaded constructors public class

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Convert this Java code to c#
The main should look like this....
image text in transcribed
Step 1 of 4 A Time class declaration with overloaded constructors public class Time2 private int numberofseconds /o-argument constructor initializes numberofseconds to Zero; public Time2 0 numberof seconds 0; )//end no-argument constructor Time2 constructor: hour supplied, minute and second //defaulted to 0 public Time int h) this (h, 0, 0) ;//invoke Time2 constructor with three arguments //end Time2 one-argument (hour) constructor //Time2 constructor: hour and minute supplied, second //defaulted to 0 public Time2 (int h, int m) this (h, m, 0);//invoke Time2 constructor with three arguments //end Time2 two-argument (hour and minute) constructor Time2 constructor: hour, minute and second supplied public Time2 (int h,int mi int s) set Time (h, m, s) //invoke set Time to validate Time //end Time2 three-argument (hour, minute and second) //constructor Time2 constructor another Time2 object supplied public Time2 (Time2 time) //invoke Time2 three argument constructor this (time getHour (),time. get Minute (),time. get Second 0); )//end Time2 constructor with a Time2 object argument //set Methods //set a new time value using total seconds; perform //validity checks on data; set invalid values to zero public void setTime (int h, int m, int s) set Hour (h) set the hour setMinute (m) //set the minute setsecond (s) //set the seconds //end method setTime Step 1 of 4 A Time class declaration with overloaded constructors public class Time2 private int numberofseconds /o-argument constructor initializes numberofseconds to Zero; public Time2 0 numberof seconds 0; )//end no-argument constructor Time2 constructor: hour supplied, minute and second //defaulted to 0 public Time int h) this (h, 0, 0) ;//invoke Time2 constructor with three arguments //end Time2 one-argument (hour) constructor //Time2 constructor: hour and minute supplied, second //defaulted to 0 public Time2 (int h, int m) this (h, m, 0);//invoke Time2 constructor with three arguments //end Time2 two-argument (hour and minute) constructor Time2 constructor: hour, minute and second supplied public Time2 (int h,int mi int s) set Time (h, m, s) //invoke set Time to validate Time //end Time2 three-argument (hour, minute and second) //constructor Time2 constructor another Time2 object supplied public Time2 (Time2 time) //invoke Time2 three argument constructor this (time getHour (),time. get Minute (),time. get Second 0); )//end Time2 constructor with a Time2 object argument //set Methods //set a new time value using total seconds; perform //validity checks on data; set invalid values to zero public void setTime (int h, int m, int s) set Hour (h) set the hour setMinute (m) //set the minute setsecond (s) //set the seconds //end method setTime

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions

Question

=+Who are you right now, and where do you want to be?

Answered: 1 week ago

Question

main vransies between traditional it briday and cloud computing

Answered: 1 week ago

Question

1. Traditional and modern methods of preserving food Articles ?

Answered: 1 week ago

Question

What is sociology and its nature ?

Answered: 1 week ago

Question

What is liquidation ?

Answered: 1 week ago

Question

Explain the different types of Mergers.

Answered: 1 week ago