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
HACTEHA [7]
4 years ago
7

There exists a data type Date with member function Increment that increments the current Date object by one. The ++ operator is

being overloaded to postincrement an object of type Date. Select the correct implementation:
1.Date Date::operator++( int ){Date temp = *this;Increment();return *temp;}2.Date Date::operator++( int ){Increment();Date temp = *this;return temp;}3.Date Date::operator++( int ){Date temp = *this;return this;temp.Increment();}4.Date Date::operator++( int ){Date temp = *this;Increment();return temp;}
Computers and Technology
1 answer:
nalin [4]4 years ago
3 0

Answer:

Date Date::operator++( int )

{

Date temp = *this;

Increment();

return temp;

}

Explanation:

Of options 1 through 4, only option 4 correctly implement the post increment of the ++ operator.

Interpreting each line of option for and comparing it to other options

Line 1: Date Date::operator++( int )

This declares the data type and its ++ operator

This is same for all options

Line 2: The Date type needs to be declared

In option 4, it was declared correctly as Date temp = *this;  using a pointer variable *this.

Here, option 2 is removed from the list of possible options.

Comparing other options

Line 3: The member increment option needs to be declared after the declaration of the date type variable.

This is correctly declared as Increment();  in option 4

Here, option 3 is removed from the list of possible options.

Comparing other options

Line 4: The value declared variable temp needs to be returned the way it was declared (without pointer indicator)

Hence, option 4 is best appropriate

You might be interested in
Over time, smart phones have become _____.
-BARSIC- [3]
I think the answer is the 2nd one
7 0
3 years ago
Read 2 more answers
An argument is different from a parameter in that an argument
erastovalidia [21]

Answer:

C. is the data passed into a parameter.

Explanation:

From the list of given options, the answer that correctly answers the question is option C.

Literally, arguments are values passed into parameters in functions;

Take for instance, the following code snippet in python

<em>def testcode(num):</em>

<em>     print(num * 2)</em>

<em>digit = 4</em>

<em>testcode(digit)</em>

In this example above;

The output is 8; and this is calculated by 4 * 2.

The parameter is <em>num</em><em> </em>and the argument is the <em>value</em> that will <em>be passed in num</em>; This value (argument) is 4

4 0
3 years ago
Read 2 more answers
How many of you got the right answer from this app​
Flura [38]
Actually, a lot, and it’s especially helpful when the answer is expert verified
8 0
3 years ago
Pls answer 10 points ​
AlekseyPX

Answer:

1. C

5.b

Explanation:

1. Is c because it is in the short cut key

5. Is B because it is the last choice

3 0
3 years ago
Read 2 more answers
Bill needs to make a presentation in which he has to represent data in the form of a pyramid. Which feature or menu option of a
andreyandreev [35.5K]

Answer:If you need to use arrows in a chart, which feature or menu option of a word processing program would you use?

A.  

Picture

B.  

Shapes

C.  

Clip Art

D.  

SmartArt

E.  

Charts

Explanation:

7 0
4 years ago
Other questions:
  • Which of the following is a reliable source of information: a book recommended from my professor, britannica, a blog, or wikiped
    6·1 answer
  • What function should be entered into B7 to calculate the total budget
    15·2 answers
  • The GeForce GTX 1060 graphics card requires 120 W of power. You plan to install it in a PCIe 3.0 ×16 slot. Will you need to also
    13·1 answer
  • During a network evaluation an administrator discovers excessive cable between a transmitter and its antenna. To clean up the lo
    9·1 answer
  • Want to.learn about computers​
    9·1 answer
  • Which position most likely requires your Master's Degree for success
    7·1 answer
  • What is the primary purpose of source code editor features such as keyword hi lighting and auto-completion A.to speed up the cod
    7·1 answer
  • 2 red and 2 overlapping balls in the center are surrounded by a green, fuzzy, circular cloud with a white line running through i
    15·2 answers
  • All of the following are personal security safeguards except ________. Select one: A. send no valuable data via email B. Use htt
    12·1 answer
  • What will happend when I got a BSOD in Windows?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!