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
Vilka [71]
3 years ago
12

Write an interface named HGTTU which specifies a universal constant int value of 42, and a single method named getNormilazedIntV

alue that takes no parameters and returns an int. The purpose of which is to get the value of the object's int instance variable, add the universal constant and return the result.Next, write a second named myInt which is composed of a single int instance variable (and the minimal set of customary methods) that implements HGTTU.
Computers and Technology
1 answer:
Nadusha1986 [10]3 years ago
8 0

Answer:

Hope this helps.

//HGTTU.java

public interface HGTTU {

 int universalConstant = 42;

  public int getNormilazedIntValue();

}

//MyInt.java

public class MyInt implements HGTTU {

  int instanceFiled;

Override

  public int getNormilazedIntValue() {

      return instanceFiled+universalConstant;

  }

}

Explanation:

You might be interested in
What does the following code do? Assume list is an array of int values, temp is some previously initialized int value, and c is
BigorU [14]

Answer:

Option D is correct.

Explanation:

Option D is correct because  when the condition  if (list[j] < temp) is tested it only gets true when element in list[] array at <em>jth</em> position is less than the value in <em>temp</em> and after that it increments the value of c by this statement: c++ and so c is incremented from 0 to as much times as much elements in list[] are lesser than temp.

6 0
4 years ago
Read 2 more answers
What job titles describes a person with green engery? in career clusters
Amiraneli [1.4K]

Answer:

environmental scientist

Explanation:

8 0
3 years ago
Write an algorithm which gets a number N, and prints all the natural numbers less than or equal N. 3.
oksian1 [2.3K]

Answer:

Algorithm:

1.Create a variable N.

2.Read the value of N from user.

3.for i=1 to N.

 3.1 Print value of i.

4.end program.

Implementation in C++:

#include <bits/stdc++.h>

using namespace std;

// main function

int main()

{

// variable

int N;

cout<<"Enter value of N:";

// read the value of N

cin>>N;

cout<<"Natural number from 1 to "<<N<<" are:";

for(int i=1;i<=N;i++)

{

// print the numbers

   cout<<i<<" ";

}

return 0;

}

Output:

Enter value of N:6                                                                                                        

Natural number from 1 to 6 are:1 2 3 4 5 6

3 0
3 years ago
James is an intern in a film production company. On his first day, James’ boss, Monica, tells him, “Before anything else, let me
bija089 [108]

Answer:

cinematography is the answer broodaaa

6 0
3 years ago
.When the ______ statement is executed, the variable or expression is evaluated and the resulting value is returned as the outpu
Yuki888 [10]

Answer:

return.

Explanation:

When a "return" statement is executed then the given expression or variable in the function is evaluated and the result will be returned by the function when the function is called.With the help of return statement, we can terminate the execution a method/function and then give control to the calling function.

Example:

#include <bits/stdc++.h>

using namespace std;

long long sq( int s )

{

 /* here "return" will first execute the expression and then

 return the value to the calling function i.e. sq() in the main

 function.

 */

   return( s * (long long)s );

}

int main()

{

   long long y;

   int x = INT_MAX;

// sq() will return a value and that value is store in the variable "y"

y = sq( x );

cout<<y<<endl;

return 0;

}

6 0
3 years ago
Other questions:
  • When using NAND gate instead of NOR gate in SR flip-flop, Q and Q’ both become one when?
    12·1 answer
  • Cd-roms typically use the _______ filesystem type.
    11·1 answer
  • Additional rows and columns are inserted into a table by using the _____ tab
    7·2 answers
  • Which column and row references are updated when you copy the formula: =SUM($B5:D$15)?
    6·2 answers
  • g 18.6 [Contest 6 - 07/10] Reverse an array Reversing an array is a common task. One approach copies to a second array in revers
    8·1 answer
  • A robot can complete 7 tasks in hour. Each task takes the same amount of time.
    15·2 answers
  • Firewalls labeled as appliances are intended to be easy to use. <br> a. True <br> b. False
    10·1 answer
  • Which is the least technically experienced technical support group?
    7·1 answer
  • How to Calculate the area of a rectangle in python
    13·2 answers
  • Which of these is true about moores law
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!