1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Shtirlitz [24]
3 years ago
13

Complete the missing code in the templatepublic class Exercise09_04Extra { public static void main(String[] args) { SimpleTime t

ime = new SimpleTime(); time.hour = 2; time.minute = 3; time.second = 4; System.out.println("Hour: " + time.hour + " Minute: " + time.minute + " Second: " + time.second); } } class SimpleTime { // Complete the code to declare the data fields hour, // minute, and second of the int type }
Computers and Technology
1 answer:
snow_lady [41]3 years ago
3 0

Answer:

The code to this question can be given as:

code:

public class Exercise09_04Extra //define class

{

public static void main(String[] args) //define main method

{

SimpleTime time = new SimpleTime(2,3,4);

//create object of the class

System.out.println("Hour: " + time.hour + " Minute: " + time.minute + " Second: " +time.second); //print result

}

}

class SimpleTime //define class

{

int hour,minute,second; //set three integer variable

SimpleTime( int hour, int minute, int second ) //define parameterized constructor

{

this.hour = hour;

this.minute = minute;

this.second = second;

}

}

Output:

Hour: 2 Minute: 3 Second: 4

Explanation:

In the above java code firstly we define a main class that is Exercise09_04Extra. In this class we create another class object that is SimpleTime . Then we call parameterized constructor and print the values. When we call the SimpleTime class in this class we define an integer variable that is hour, minute and second and create the parameterized constructor and pass the variable as a parameter.In this constructor we use this keyword to hold the value of the passing variable. So the output of the following code is "Hour: 2 Minute: 3 Second: 4 ".

You might be interested in
(asking again because point-hogs exist)
yawa3891 [41]

The answer is 2-to-the-power-of-n, since for every input, the number of different combinations doubles. From your list I think answer A is meant to indicate 2ⁿ.

6 0
3 years ago
What is the term that is used to describe a computer system that could store literary documents, link them according to logical
madreJ [45]

Answer:

hypertext

Explanation:

Based on the information provided within the question it can be said that the type of computer system function being described is known as hypertext. This displays text to the computer display that references other literary documents for immediate access to them. These are documents with a specific relation to the text that is being displayed and also allows readers to comment and annotate what they read on the documents.

5 0
3 years ago
Pls someone help me with these four questions
ipn [44]

Answer:

16. Grace Hopper. 1959.

8 0
3 years ago
What are two reasons for entering the ping 127.0.0.1 command on a windows pc?
Hunter-Best [27]

127.0.0.1 is the loopback Internet Protocol (IP), the address is used to establish an IP connection to the same computer being used by the end-user.

The some reason that a person will command a ping 127.0.0.1 in a command prompt is because they will check if the NIC and drivers implementation is functional and it used in testing the TCP/IP.

4 0
4 years ago
Read 2 more answers
A key principle of human-computer interaction (HCI), that states that the appearance of any control should suggest its functiona
kaheart [24]

Answer:

"Affordance" is the correct answer.

Explanation:

  • The performance or properties of such an entity that determines its possible applications which makes it abundantly clear how everything could and should always be used people are sitting or standing on something like a chair as it is very apparent.
  • Users are allowed to experience conceptions without thinking about how to make use of other objects.
4 0
3 years ago
Other questions:
  • Which company is credited with solving a problem by creating a program that could work on all computers?
    11·1 answer
  • Which is an advantage of setting bookmarks?
    15·1 answer
  • You have just installed a SOHO router in a customer's home and the owner has called to say his son is complaining that Internet
    5·1 answer
  • Write a declaration for a class named City, which has the members cityName, a string, and position, a Location structure (declar
    10·1 answer
  • Natalie is a secretary and must complete a large amount of filing this afternoon. At 1:00 PM, the office receptionist gets sick
    10·1 answer
  • A student who used a regression model that included indicator variables was upset when receiving only the following output on th
    10·1 answer
  • What offers backup services that use cloud resources to protect applications and data from disruption caused by disaster? Multip
    9·1 answer
  • Installation and the ongoing maintenance of software in a database system are the job of the database __
    6·1 answer
  • Give five examples of physical networking.
    15·1 answer
  • Instructions
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!