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]
3 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]3 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
Linux is: Select one: a. primarily concerned with the tasks of end users. b. designed for specific machines and specific micropr
ivann1987 [24]

Answer:

C. an example of open-source software.

Explanation:

open-source software is the type of software in which anyone can access, it can also be shared And modified by anyone simply because ita accessible to the public.

Hence and open source software's source code can be

inspected, enhanced and modified by anyone. A typical example is Linux.

7 0
3 years ago
Subcribe to me for brainly my YT is KeepUsweatin
Flura [38]

Answer:

Ok got you. Will do so. Mine is Phantom Pac.

5 0
2 years ago
If you are feeling sick and you want to drive somewhere, you should
Ganezh [65]

Answer

Ask someone to drive you.

Explanation

When feeling ill, or even taking medication before driving Is dangerous for the driver and other road users  because it slows reactions and the ability to make rapid corrective actions while driving. Driving while sick  can also have the same effects on a driver as if they were drinking.

5 0
3 years ago
Read 2 more answers
In the web form you are creating, you want a multiple-option select list to appear with five options. which line of html code wi
suter [353]
You will use a <select> for this. For example:

<select name="choice">
  <option>First</option>
  <option>Second</option>
  <option>Third</option>
  <option>Fourth</option>
  <option>Fifth</option>
</select>
5 0
3 years ago
Choose the term that best completes each sentence.
olga2289 [7]

Answer:

The answer to the above questions is given in explanation section:

Explanation:

abstraction hides the details about a specific piece of information.

The suitable match for this is Data

Because the word "Piece of information " can only be referred to data not to process.

Now look at the second

abstraction hides the details about a specific process

The suitable match here is procedural.

because specific process can only be referred to procedure not to data.

6 0
2 years ago
Read 2 more answers
Other questions:
  • It takes an older computer twice as long to send out a company's email as it does a newer computer. Working together, it takes t
    15·1 answer
  • SI TENGO: ¿R = 255, G0 =, B = 0, QUE COLOR OBTENGO?
    14·1 answer
  • The term integration refers to the ability to
    6·1 answer
  • According to the municipal solid waste report what are the benefits of recycling
    6·1 answer
  • Lines s, t, and u are perpendicular bisectors of the sides FGH and meet at J. If JG=2x+2, JH=2y-4, JF=8 and HI=3z-3, find x, y,
    15·2 answers
  • Why are computers useful for modeling situations?
    13·2 answers
  • Identify the correct sequence of steps to change the font from Verdana to Arial.
    5·1 answer
  • A recursive method may call other methods, including calling itself. A recursive method has:
    7·1 answer
  • Which of the following database object hold data?
    13·2 answers
  • What are the features of the title bar for the Microsoft word application?​
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!