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
Natasha2012 [34]
4 years ago
11

Implement a class MyInt() that behaves almost the same as the class int, except when trying to add an object of type MyInt. Then

, this strange behavior occurs____________.
Computers and Technology
1 answer:
mel-nik [20]4 years ago
8 0

Answer:

Implement a class MyInt() that behaves almost the same as the class int, except when trying to add an object of type MyInt. Then, this strange behavior occurs.

>>>  x = myInt(5)

>>>  x * 4

20

>>> x * (4 + 6)

50

>>> x + 6

11

You might be interested in
Why must programs written in a high-level language be translated into machine language?
eimsori [14]
The only thing that a computer actually understands is machine language. English-like constructs are gibberish to a computer, so they need to be translated by a compiler to machine language to run natively.
4 0
3 years ago
Why have companies gotten more creative with ways to reach us?​
Zielflug [23.3K]

Answer:

D.) We often ignore messages sent by companies or ads

Explanation:

Companies are trying to be more creative with their approach towards people, as if we read their messages, we may consider buying or checking out their product.

6 0
3 years ago
Earthquakes _____.
rosijanka [135]
<span>B: can be caused by volcanic eruptions</span>
7 0
3 years ago
Read 2 more answers
What is the simplest way to permanently get rid of an unwanted file? A. Cancel the file. B. Go to the Start menu and then delete
Morgarella [4.7K]
Go to the Start menu and then delete the file <span>is the simplest way to permanently get rid of an unwanted file</span>
5 0
4 years ago
github Portfolio Balances An investor opens a new account and wants to invest in a number of assets. Each asset begins with a ba
OLEGan [10]

The following code will be used to determine the maximum amount invested

<u>Explanation:</u>

long maxValue(int n, int rounds_rows, int rounds_columns, int into rounds)

{

   // Define the variable to store

   // the maximum amount invested.

   long max = 0;

   

   // Define an array of size n,

   // to store the n investments.

   long *investments = (long*)malloc(sizeof(long)*n);

   int i=0;  

   // Initially set all

   // the investments to 0.

   for(i=0;i<n;i++)

   {

       investments[i] = 0;

   }

   i=0;

   // Run the loop to

   // perform the rounds.

   while(i<rounds_rows)

   {

       // Get the left value

       // of the current round.

       int left = rounds[i][0];

       

       // Get the right value

       // of the current round.

       int right = rounds[i][1];

       // Get the contribution

       // for the current round.

       int contribution = rounds[i][2];

       // Since the user uses 1-based

       // indexing, subtract 1 from left

       // and right as the program uses

       // 0-based indexing. That is, the

       // investments in the array start

       // from 0 and not 1.

       right = right - 1;

       int j=0;

       // Run the loop to add the

       // contribution to all the investments

       // between left and right, both inclusive.

       for(j=left; j<=right; j++)

       {

           investments[j] += contribution;

       }

       i++;

   }

   // Traverse the investments array

   // to find the maximum element.

   max = investments[0];

   for(i=1; i<n;i++)

   {

       if(investments[i]>max)

       {

           max = investments[i];

       }

   }

   // Return the

   // maximum investment.

   return max;  

}

6 0
4 years ago
Other questions:
  • PLS HELP ASAP! WILL GIVE BRAINLIEST!
    14·1 answer
  • When registering a new domain name, either the registrar's servers or self-owned servers can be used as name servers. What funct
    15·1 answer
  • ​Case-Based Critical Thinking Questions​Case 9-1Melissa, a computer science engineering student, is learning the basics of progr
    11·1 answer
  • Write a complete program whose class name is hello and that displays hello, world on the screen.
    13·2 answers
  • What is batch processing?
    12·1 answer
  • Which of the following sentences is correct?a. Arithmetic log unit is used to perform both integer and floating point computatio
    8·1 answer
  • Why would online learning make you lazy
    13·1 answer
  • What are business rules​
    14·1 answer
  • It is a type of web page that allows you to share your ideas experiences and beliefs
    9·1 answer
  • Databases containing the research, writing and studies conducted by Academic
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!