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
nika2105 [10]
3 years ago
10

To guarantee that the member variables of a class are initialized, you use ____.

Computers and Technology
1 answer:
Leya [2.2K]3 years ago
8 0
A constructor, member initialization lists and also the default member initializer. Here you see all three (in reality you choose one construct per variable).

class A
{
  public:
    int x = 0;

   A() : x(1)
   {
      x = 2;
   }
};
You might be interested in
______-____ parameters provide a one-way link between actual parameters and formal parameters.
Oxana [17]

Answer:

Value

Explanation:

3 0
2 years ago
What would you need to have on your foley stage
LUCKY_DIMON [66]
<span>You will need many props for your Specific tracks (whatever you see in the film!). It's impossible to say what you will need until you see the picture and as time goes by you will add to your collection (if you have space!) - garbage day in my neighborhood is 'golden day' as I collect some of best props from the stuff people throw out: old bicycles, doors, sinks, wood, metal, desks, etc.</span>
4 0
3 years ago
Assume that programs spend about 25% of their time waiting for I/O operations to complete. If there are FOUR programs loaded int
natima [27]

Answer:

0.9961

Explanation:

Given that:

Proportion of time waiting for I/O operation to complete = 25% = 0.25

Number of programs waiting in memory = 4

Using the CPU Utilization formula :

CPU Utilization = 1 - p^n

1 - 0.25^4

1 - 0.00390625

0.99609375

5 0
3 years ago
Byte pair encoding is a data encoding technique. The encoding algorithm looks for pairs of characters that appear in the string
erica [24]

Answer:

C. Byte pair encoding is an example of a lossless transformation because an encoded string can be restored to its original version.

Explanation:

Byte pair encoding is a form of encoding in which the most common pairs of consecutive bytes of data are replaced by a single byte which does not occur within the set of data.

For example, if we has a string ZZaaAb, it can be encoded if the pairs of string ZZ are replaced by X and the second pair by Y. So, our data now becomes XYAb.

To get our original data, that is decode it, we just replace the data with the keys X = ZZ and Y = aa thus allowing our original data to be restored.

Since our original string is restored without loss of data, it implies that <u>byte pair encoding is an example of a lossless transformation because an encoded string can be restored to its original version.</u>

8 0
3 years ago
Write a function solution that returns an arbitrary integer which is greater than n.
Aleksandr-060686 [28]

Answer:

   public static int greaterThanInt(int n){

       return n+10;

   }

Explanation:

This is a very simple method in Java. it will accept an argument which is an integer n and return n+10 since the question requires that an arbitrary integer greater than n be returned adding any int value to n will make it greater than n.

A complete java program calling the method is given below:

<em>import java.util.Scanner;</em>

<em>public class ANot {</em>

<em>    public static void main(String[] args) {</em>

<em>        Scanner in = new Scanner(System.in);</em>

<em>        System.out.println("Please enter an integer");</em>

<em>        int n = in.nextInt();</em>

<em>        int greaterInt = greaterThanInt(n);</em>

<em>        System.out.println("You entered "+n+", "+greaterInt+" is larger than it");</em>

<em>    }</em>

<em>    public static int greaterThanInt(int n){</em>

<em>        return n+10;</em>

<em>    }</em>

<em>}</em>

4 0
4 years ago
Other questions:
  • ____ are not associated with data from the database and are used to display such things as the report's title
    15·1 answer
  • In your presentation you added a text box to?
    5·1 answer
  • What allows windows to quickly be resized by clicking the title bar of the window and dragging it to the top, sides, or middle o
    9·1 answer
  • All of the following municipal securities are quoted on a yield basis EXCEPT: A) term bonds. B) secured bonds. C) tax-anticipati
    10·1 answer
  • Which of the following would be considered hardware? Select 3 options.
    7·1 answer
  • How is communication within healthcare different than communication within other industries ?
    13·1 answer
  • suspect that several users are attempting to install unauthorized software. Upon researching, you discover that the attempts wer
    12·1 answer
  • You have a passage of text that needs to be typed out, but some of the letter keys on your keyboard are broken! You're given an
    14·1 answer
  • Write a program that prompts the user for two numbers then outputs the result of dividing the first number by the second number
    10·1 answer
  • HELP ME PLEASE 41 PTS
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!