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
Irina18 [472]
3 years ago
8

Class secretType { public: static int count; static int z; secretType(); secretType(int a); void print(); static void incrementY

(); private: int x; static int y; }; secretType::secretType() { x = 1; } secretType::secretType(int a) { x = a; } void secretType::print() { cout << "x = " << x << ", y = " << y << "z = " << z << ", count = " << count << endl; } static void secretType::incrementY() { y++;}. Which of the following statements correctly creates the object mySecret of type secretType and sets the value of the member variable x to 9?a. secretType mySecret(9).b. mySecret = secretType(9).c. secretType = mySecret(9).d. secretType(9).mySecret.
Computers and Technology
1 answer:
ANEK [815]3 years ago
6 0

Answer:

a. secretType mySecret(9)

Explanation:

You might be interested in
Programs for embedded devices are often written in assembly language. Some embedded processors have limited instructions, like M
oksano4ka [1.4K]

Answer:

#include <iostream>

using namespace std;

int main()

{

   char address[2];

   int tag, firstBit, secondBit, setNumber;

   int cache[4][2]={{1,5}, {2,4}, {3,2}, {6,0}};

   cout << "Enter the address as hex(in small letters: "<

   cin >> address;

   for (int i < 0; i < 8; i++){

       if (address[0] == '0'){

           tag = 0;

           firstBit = 0;

        } else if (address[0] == '1'){

           tag = 0;

           firstBit = 1;

        } else if (address[0] == '2'){

           tag =1;

           firstBit = 0;

        } else if (address[0] == '3'){

           tag = 1;

           firstBit = 1;

        } else if (address[0] == '4'){

           tag = 2;

           firstBit = 0;

        } else if (address[0] == '5'){

           tag = 2;

           firstBit = 1;

        }  else if (address[0] == '6'){

           tag = 3;

           firstBit = 0;

       } else if (address[0] == '7'){

           tag = 3;

           firstBit = 1;

       }  else if (address[0] == '8'){

           tag = 4;

           firstBit = 0;

       } else if (address[0] == '9'){

           tag = 4;

           firstBit = 1;

       }   else if (address[0] == 'A'){

           tag = 5;

           firstBit = 0;

       } else if (address[0] == 'B'){

           tag = 5;

           firstBit = 1;

       }  else if (address[0] == 'C'){

           tag = 6;

           firstBit = 0;

       } else if (address[0] == 'D'){

           tag = 6;

           firstBit = 1;

        }  else if (address[0] == 'E'){

           tag = 7;

           firstBit = 0;

       } else if (address[0] == 'F'){

           tag = 7;

           firstBit = 1;

       } else{

           cout<<"The Hex number is not valid"<< endl;

        }

   }

   if(address[1]>='0' && address[1]<'8'){

       secondBit = 0;

  }  else if(address[1]=='8'|| address[1]=='9'||(address[1]>='a' && address[1]<='f')){

       secondBit = 1;

   }  else{

       cout<<"The Hex number is not valid"<< endl;  

       return 0;

   }

   setNumber = firstBit * 2 + secondBit;

   if(cache[setNumber][0]==tag || cache[setNumber][1]==tag){

       cout<<"There is a hit";

   } else{

       cout<< "There is a miss";

   }

   return 0;

}

Explanation:

The C++ source code prompts the user for an input for the address variable, then the nested if statement is used to assign the value of the firstBit value given the value in the first index in the address character array. Another if statement is used to assign the value for the secondBit and then the setNumber is calculated.

If the setNumber is equal to the tag bit, Then the hit message is printed but a miss message is printed if not.

4 0
3 years ago
1. What does it mean to say that a country’s land area is positively correlated with its population?
disa [49]
For 1.
Positive correlation means if you plot a country's population and land size on a graph. There would be a linear regression line that's sloping upwards. 

Since it's a scatterplot, there will be some that fall out of the line, but most of them should be on the line.

It's  (A)

For 2.
An outlier is a datapoint that's far, FAR away from the others, so it's (B)

For 3. (A), it's a single line-of-best fit that runs through the middle of the cluster of data points.
5 0
3 years ago
Read 2 more answers
. What process skill would a scientist use to find the length of a line
Brilliant_brown [7]

Answer:

Explanation:

A ruler

;););););););););););););););)

7 0
3 years ago
To change the size of a field or record by dragging its border a.resize b.magnify c.label d.enlarge
4vir4ik [10]
A. Resize

By dragging the border of a field or record, you are either enlarging it or compressing it. Choices "b" and "d" are only half correct, as there is always the possibility of making it smaller. Hope this helps!
6 0
3 years ago
Read 2 more answers
How can you know if the person or organization providing the information has the credentials and knowledge to speak on this topi
Minchanka [31]

Answer:

The affiliation of the writer is that She is on the staff at the Center for Food Safety (CFS).

Explanation:

CFS stands for the Center for Food Safety which is the national non-profitable public environmental and interest advocacy organization that is working for protect the human health and environment by the curbing use of the harmful food productions technologies and by the promoting an organic and other form of the sustainable agriculture.

7 0
2 years ago
Other questions:
  • Consider the class Money declared below. Write the member functions declared below and the definition of the overloaded +. Modif
    13·1 answer
  • You have no control over who views your social network information
    13·2 answers
  • You are given two int variables j and k, an int array zipcodeList that has been declared and initialized, an int variable nZips
    10·2 answers
  • How can you efficiently restrict the read-only function of a requesting SNMP management station based on the IP address?
    14·1 answer
  • How does emotional awareness help you with non-verbal communication?
    13·2 answers
  • What is the purpose of an internet protocol address (ip address)? it specifies whether a computer is using a broadband network o
    10·1 answer
  • Given the following sets, for each set operation provide the elements of the resulting set in set notation or using a well-known
    5·1 answer
  • Which of these programmers creates the core game engine?
    5·2 answers
  • what could a company do if it was using a commercial wan and a vulnerability appered thst allowed attackers
    11·1 answer
  • Question 1 (1 point)
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!