answer.
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
AysviL [449]
2 years ago
10

What is printed by the following program provided all necessary standard header files are included? Explain each line of the out

put by stating which member function generates the result and why to justify your answer.#include iostream> using namespace std; class A { public: virtual void f1() cout<<("fl in A/n") voidf2 () { cout << "f2 in A/n";} }class B: public A {public: void f1() cout <<"fl in B/n"; void f2() cout <<"f2 in B/n }void g(A &x){ x.f1(); x.f2(); int main(){A;aB:bg(a);g(b);a.f1();a.f2();b.f1();b.f2();}
Computers and Technology
1 answer:
Ostrovityanka [42]2 years ago
8 0

<u>Output:</u>

f1 in A

f2 in A

f1 in B

f2 in A

f1 in A

f2 in A

f1 in B

f2 in B  

<u>Explanation:</u>

In this snippet, the code makes use of virtual functions. A virtual function is defined as a function that is defined in the base class and redefined in the derived class. If the derived function accesses the virtual function, the program will get executed with the derived class’s version of the function.

In this code, we define the virtual function f1() in class A and also redefine it in class B which is the derived class of A. While executing the program, the function g which takes the object b (class B’s object) as a parameter. It will print class B’s version of f1() rather than class A’s version. This is working off the virtual function.

You might be interested in
The ________ method is based on simple arithmetic. The process involves dividing the bits of a frame into equal segments, adding
liq [111]

Any answer choices?            


6 0
2 years ago
There are two methods of enforcing the rule that only one device can transmit. In the centralized method, one station is in cont
Levart [38]

Answer:

In centralized method, the authorized sender is known, but the transmission line is dominated by the control station, while in decentralized method, one station can not dominate the line but collision on the transmission line may occur.

Explanation:

Centralized method of communication requires for a control station to manage the activities if other stations in the network. It assigns turns to one known station at a time, for transmission.

Decentralized method allows stations in a network to negotiate and take turns in transmitting data. When a station is done with the transmission line, another station on the queue immediately claims the line.

3 0
2 years ago
Describe copyright statute, disclaimers, and filing procedures.
gayaneshka [121]

Answer:(Answers may vary.)

I researched about different concepts regarding statute of limitations, disclaimers, and filing procedures regarding copyright issues.

Statute of limitations

Statute of limitations for copyright falls under two categories. The first is a limitation for ‘Criminal Proceedings’. In this case, the statute stands that the claim (or lawsuit) has to be filed within five years of the cause (act of infringement). The second consideration is in the ‘Civil Action’ case. Here the claim (lawsuit) has to be filed within three years of the cause. Many times the last act of infringement is taken as the date from which these five (or three) years are calculated. There have been cases where the date when the infringement was discovered by the victim, is taken as a starting date.

Disclaimers

A disclaimer is a statement that is intended to pass on some information about the content of the design to the viewer. This disclaimer may be to signify the intent of the designer behind the content. It may also be a suggestion or warning to ensure the viewer uses discretion while viewing the content. A disclaimer is mutual understanding between the designer and viewer. This would protect the designer rights in a situation where the viewer claims damages after the viewer clearly disregarded the disclaimer.

Filing procedures

A claim for copyright has to be filed (ideally) before any infringement occurs, or within three months of the infringement. Timely registration would help the claim for damages. I can file for a copyright online (U.S. Copyright Office). I can also file for a copyright in printed form at the U.S. Copyright Office. I would need two copies of my work at the time of filing. The online facility is charged (fees) lesser than direct submission. I would have to sure which form I fill, as all the forms refer to different types of work.

Explanation: I just did it and it showed me.

7 0
2 years ago
Catherine wants to search online for fruit juices. She is fine with aerated or fresh fruit juices. Which Boolean operator will e
ZanzabumX [31]
<h2>Answer:</h2>

<u>She will use the </u><u>OR Boolean operator</u>

<h2>Explanation:</h2>

Boolean Operators are used to connect and define the relationship between your search terms. Doing searching in any electronic databases like Google search engine, we use Boolean operators to either narrow or broaden our searches. The three Boolean operators are AND, OR and NOT. Among these operators OR is used to add the items. Since Catherine is searching for aerated or fresh fruit juices so she needs both the results therefore she must use OR operator.


8 0
2 years ago
Read 2 more answers
Two women are on either side of a high fence. One of the women, named Apple- server, has a beautiful apple tree loaded with deli
ZanzabumX [31]

Answer:

ok cool

Explanation:

kkk

6 0
2 years ago
Other questions:
  • 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
  • Write a script that creates a user-defined database role named OrderEntry in the MyGuitarShop database. Give INSERT and UPDATE p
    8·1 answer
  • What three requirements are defined by the protocols used in network communications to allow message transmission across a netwo
    11·1 answer
  • In a real-world environment, changing granularity requirements might dictate changes in primary key selection, and those changes
    15·1 answer
  • If byte stuffing is used to transmit Data, what is the byte sequence of the frame (including framing characters)? Format answer
    6·1 answer
  • Suppose that we have a set of activities to schedule among a large number of lecture halls, where any activity can take place in
    8·1 answer
  • Jen is trying to discover if a motor has failed windings. What sort of test can she do.
    6·1 answer
  • While Angela is making modifications to Katie’s Word document, she would like to inform Katie of the reasoning for the change. W
    10·1 answer
  • What is the average number of nodes accessed in search for a particular element in an unordered list? In an ordered list? In an
    6·1 answer
  • A group of developers for a startup company store their source code and binary files on a shared open-source repository platform
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!