Question

Question 1: Please answer the following sub questions 1.1) Why is it important to create C++...

Question 1: Please answer the following sub questions

1.1) Why is it important to create C++ abstract virtual class?
1.2) Why would I want to use a C++ abstract virtual class?
1.3) Why override methods of C++ abstract virtual class and not just create them?

Homework Answers

Answer #1

1.1)

The purpose of an abstract class is to define a common protocol for a set of concrete subclasses. This is useful when defining objects that share code, abstract ideas, etc.

Abstract classes have no instances. An abstract class must have at least one deferred method (or function). To accomplish this in C++, a pure virtual member function is declared but not defined in the abstract class.

1.2)Abstract classes are used to provide an Interface for its sub classes. Classes inheriting an Abstract Class must provide definition to the pure virtual function, otherwise they will also become abstract class.Abstract classes are used to represent general concepts (for example, Shape, Animal), which can be used as base classes for concrete classes (for example, Circle, Dog).

1.3)If we do not override the pure virtual function in derived class, then derived class also becomes abstract class.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Question 1: Please answer the following sub questions 1.1) What happens to connection information if you...
Question 1: Please answer the following sub questions 1.1) What happens to connection information if you change mysql port number? 1.2) Why is it important to create an interface? 1.3) Why would you want to use java interfaces? 1.4) Why override methods of interface and not just create them?
QUESTION 1 Answer each of the following questions by TRUE or FALSE. (1.1) The correlation coefficient...
QUESTION 1 Answer each of the following questions by TRUE or FALSE. (1.1) The correlation coefficient between two variables is always between 0 and 1. (1.2) The t−statistic is an indicator of the level of significance of correlation. (1.3) The overall significance of a regression is determined by the R2 . (1.4) Moving average is a useful tool that helps dealing with seasonality in time-series. (1.5) The seasonal index is an indicator of forecast accuracy
PLEASE use your own words because I have posted this questions before and the answer was...
PLEASE use your own words because I have posted this questions before and the answer was just coping. #Section 1 instructions: #Answer the following two questions in your own words. #Save your answers to the provided objects as strings. #(i.e., aS1Q1 <- "my answer") #Question 1.1 #What is a program? aS1Q1 <- #Question 1.2 #what are three reasons why quantitative researchers program? aS1Q2 <-
In quick books please explain the following four questions: 1.Why would you want to create custom...
In quick books please explain the following four questions: 1.Why would you want to create custom items? 2.Where do you use the custom items? 3.Why would you want to create a custom report? 4.What are the benefits of a customer report?
JAVA QUIZ Question 1 Which of the following is false about a "super" call in a...
JAVA QUIZ Question 1 Which of the following is false about a "super" call in a sub class's constructor? Select one: a. It must be the first statement in the constructor b. If you don't include it Java will c. If you don't include it you must have a 0 parameter constructor coded in the super class or no constructors coded at all in the super class d. The sub class constructor containing the super call and the called super...
C# Please just annswer all questions. if you going to answer 1 or 2 questions only...
C# Please just annswer all questions. if you going to answer 1 or 2 questions only please don't answer any. Thank you 1) To make it easy to test a class library, you can: a.   Make sure that all of the classes require only the System namespace b.   Put references to all of the .NET namespaces in the library c.   Add one class to the library at a time d.   Develop the class library project within a solution that contains...
Question 1 1.1. If a price floor were imposed on a competitive market, what would be...
Question 1 1.1. If a price floor were imposed on a competitive market, what would be the effect on the producer surplus and total economic surplus areas? (Use a typical demand-supply curve diagram in your answer.) 1.2. Explain why the slope of the demand curve is important to determining the effect of the price floor on the change in the size of consumer surplus area. (You can use a diagram if you wish.) 1.3. Describe a situation where you think...
Please answer the following questions: 1. Why would anyone want to set up a trust? 2....
Please answer the following questions: 1. Why would anyone want to set up a trust? 2. What is the difference between a revocable and irrevocable trust? 3. Why would anyone set up an irrevocable trust for their children and name someone else as the trustee?
Please answer the following questions by only typing the answers, and please make your answers as...
Please answer the following questions by only typing the answers, and please make your answers as short as possible. 1-How do I determine the b for a T beam? 2-Why can’t I just use half the clear spacing between the beams? 3-In a slab, why do I call temperature and shrinkage steel “just because” steel? 4-What are the four benefits of using compression steel in a beam?
Below are survey questions please answer question 1-5 retaining survey questions How satiistisied are you with...
Below are survey questions please answer question 1-5 retaining survey questions How satiistisied are you with the coapny preformance? How did you hear about us? How would you rate quality of sercice the comany provides? How lilkey are you to use our sercice in the future? How did service meet you needs? What type of discount would uyou likly use? Would you be more likely to use our services if advetised with tv, magazine, newspaper? What gender are you? what...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT