Consider the following inheritance in C++: Shape Shape2D Circle Square Rectangle What is true in the above inheritance? Shape3D Cube Sphere a) only ii b) only ii and iii c) only i and ii d) only iii i) Shape and Shape3D have has-a relationship, as Shape class contains Shape3D class ii) It is an example of multi-level inheritance, but not multiple inheritance iii) Statements Square sqObj; Shape* shObj=&sqObj; causes errors
Q: How many steps would there be in constructing a website, if you could enumerate them? Provide your…
A: Website:A website is a collection of web pages and related content that is accessible through a…
Q: The current convergence of digital devices and their connection to mobile phones must be explicable.
A: - In recent years, there has been a significant convergence of digital devices, resulting in their…
Q: without using% and, in python. Take the nsertion data from user (they are of float dat ype) and…
A: Take the data from the user using the input method and typecast their type from string to float and…
Q: What are SSH's various uses? Make a list of SSH abbreviations with brief explanations as you go.
A: Secure Shell (SSH) is a cryptographic network protocol that provides secure communication between…
Q: Why is it advantageous to know how to use computers and other modern devices?
A: In today's digital world, having a computer and other technological literacy has various benefits.…
Q: What exactly does the term "deppresion" mean?
A: The term "depression" is widely used in various contexts, often referring to a state of deep sadness…
Q: Please describe cache coherency in a few sentences.
A: A technique for ensuring that every processor in a multiprocessor system sees the same image of…
Q: The concept of two-factor authentication causes me to rack my mind. How much does it assist to…
A: Two-factor authentication (2FA) is a security mechanism that provides an additional layer of…
Q: Even if the execution time of pipeline instructions varies, the answer to this query remains…
A: In this question we have to understand - Even if the execution time of pipeline instructions varies,…
Q: How do these fields differ? How do software development and project management differ?
A: Software Development and Project Management are distinct fields within the realm of technology and…
Q: One of the defining characteristics of a mobile application is its portability.
A: => A mobile application, commonly referred to as a mobile app, is a software…
Q: Explain why computer systems need read-only memory (ROM) and what it does. What information is…
A: For numerous details, Read-Only Memory (ROM) is an integral essential of a processer scheme.…
Q: Because CPU clock speed is printed and electricity is immutable, it is preset. To rephrase: what…
A: In the world of computing, the CPU (Central Processing Unit) is often referred to as the brain of…
Q: What are some distinguishing characteristics of Azure Domain? Microsoft is optional. What…
A: Azure domain is a flexible and open-source cloud platform that helps in development, service…
Q: Explain UNIX quickly. This section discusses six UNIX file-creation and management programmes.
A: UNIX is a robust and versatile operating system known for its stability and flexibility.It treats…
Q: What would the business case for cloud migration look like if it were created?
A: Cloud migration refers to moving digital business operations into the cloud. This process involves…
Q: When it comes to firewalls, what kind of structure is the most common? Why? Explain.
A: Answer:It is a kind of firewall that monitors and filters network traffic based on previously…
Q: Distinguish between combinational and sequential circuits.
A: Logic circuits, also known as digital logic circuits, are electronic circuits designed to perform…
Q: Do you think using Virtual reality is dangerous?,
A: Given:Do you think using Virtual reality is dangerous?,
Q: How difficult is it to find a reasonable balance between the efficacy of the CPU, RAM, interface,…
A: The difficulty of finding a reasonable balance among various hardware mechanisms such as CPU, RAM,…
Q: Describe a cookie-based internet authentication attack.
A: Cookie-based verification is widely used virtual to verify and preserve user sessions. The server…
Q: Write a python program to get the specific line from a given File and that line number should be…
A: I have provided PYTHON CODE , CODE SCREENSHOT , TXT FILE SCREENSHOT and OUTPUT…
Q: Distinguish between local and global variables, and define their scopes.
A: => A local variable is a variable that is declared within a specific block of code, such…
Q: Those data centres interested in automating their component recall processes should take a…
A: Those data centres interested in automating their component recall processes should take a…
Q: This article provides an overview and analysis of the IOT temperature monitoring system.
A: The Net of Things (IoT) has radically reshaped many businesses by letting real-time data gathering,…
Q: These five initiatives could help educate employees and increase workplace productivity.
A: Skill-based exercise programs are essential in enhancing operatives' efficiency. Such initiatives…
Q: The steps that would be taken to send a message in a safe way are shown.
A: 1) A message refers to a unit of data or information that is being transmitted from a sender to a…
Q: Some applications may utilise the capabilities of both UDP and TCP transport-layer protocols. How…
A: In this question we have to understand - Some applications may utilise the capabilities of both UDP…
Q: ou are given 4 items as {value, weightpairs in this format {{20, 5}, {60, 20}, {25, 10}, {X, 25}}You…
A: Required:-Give me an example of f formatted string in python. Take all the data from the…
Q: What is the Azure Platform from Microsoft?
A: Microsoft Azure, colloquially portrayed to as Blue, is a cloud computing attitude developed by…
Q: Describe an attack against cookie-based authentication on the Internet.
A: Cookie-based verification is widely used virtual to verify and preserve user sessions. The server…
Q: IOT temperature monitoring system introduction and analysis.
A: - The Internet of Things (IoT) has revolutionized various industries by connecting devices and…
Q: Label the Recursion Requirements. int fact (int n) int result; } if(n==1) return 1; result = fact…
A: Given:int fact (int n){ int result; if (n==1) return 1; result = fact…
Q: Are there distinct stages involved in the creation of a website? Walk us through each stage and…
A: Creating a website involves several stages that collectively contribute to the successful…
Q: Cloud computing is the buzz word everywhere. There are many sources of this technology. List and…
A: Cloud computing has revolutionized the way businesses operate and has become an integral part of…
Q: What distinguishes Microsoft Azure from AWS?
A: Microsoft Azure and Amazon Web Services (AWS) are two of the leading cloud computing platforms in…
Q: What happens if an adversary modifies the Tag (MAC) and ciphertext of a communication while it is in…
A: Message Authentication Codes (MACs) play a vital role in ensure the integrity and legitimacy of…
Q: Why is it useful to learn about computers, computer systems, hazardous software, computer security,…
A: Learning about computers, computer systems, hazardous software, computer security, the internet, and…
Q: If a cloud service experiences a data breach, would it be possible to alter the way it manages…
A: The Imperative of Security Evolution in Cloud ServicesCloud services have revolutionized the way…
Q: Input or output for the keyboard and scanner? Place a checkmark next to each item.
A: The keyboard and the scanner: input or output?Keyboard: Input ✔️Scanner: Input ✔️ (It is used to…
Q: What are some signs of tampering or corruption in a laptop's operating system?
A: Laptop operating system:A laptop operating system is the software that manages and controls the…
Q: Is it essential to be able to use a spreadsheet programme?
A: The spreadsheet is a computer program that can capture, display and manipulate data arranged in rows…
Q: Multitasking lets you switch apps rapidly. Can a machine swap OSes? Will you answer that question?…
A: A machine cannot dynamically switch between different operating systems like an application can…
Q: Determine how technological advancements allow people to circumvent their moral obligations and…
A: Technological advancements have undoubtedly brought numerous benefits and opportunities to society.…
Q: Explain the five key internet governance sectors and their issues. List the five key internet…
A: Internet governance is a complex and multifaceted field that involves various sectors and…
Q: Describe a local area network and a wide area network, and provide an example of each
A: LAN is like a computer network that connects computers and other devices within a limited…
Q: Should law enforcement have access to Facebook and other social media accounts to investigate…
A: The rapid growth of social media platforms has transformed the way people communicate, share…
Q: Write main benefits of being a White Hat Hacker?
A: Being an ethical hacker, often known as a white hat hacker, has several advantages in today's…
Q: How broadly can the term "phishing" be defined?
A: The term "phishing" is related to computer security or cyber security specifically cyber attacks.…
Q: Why does video require a larger amount of storage capacity compared to other forms of data?
A: Video data is quite evident from other forms of data, such as transcript or images. A video is a…
![Consider the following inheritance in C++:
Shape
Shape2D
Circle Square Rectangle
Shape3D
Cube Sphere
What is true in the above inheritance?
i) Shape and Shape3D have has-a relationship, as Shape class contains Shape3D class
ii) It is an example of multi-level inheritance, but not multiple inheritance
iii) Statements Square sqObj; Shape* shObj=&sqObj; causes errors
a) only ii
b) only ii and iii
c) only i and ii
d) only iii](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fab751aa8-a4df-45b6-8ae5-236f640f748b%2F6ce7e32c-3a49-4478-87ab-9a1638d3e1cd%2Flv3u2wu_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 4 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
- Create a C++ console application that implements this inheritance hierarchy. Note the following: The game has no "Enemy" object but it does have specific enemies. (Abstract) All enemies will have the following properties or behaviours Damage - A value representing how much damage they would do to an enemy. Default enemy damage is 10. Warcry - A proclaimation of their intent to do battle. Default enemies warcry is "Roar!" Attack - An ability to combine a warcry with damage. (Ex: "Roar!" "Deal 10 damage to opponent"). Skeleton: Damage - Base enemy damage Warcry - Base enemy warcry but with the addition of "Hssssssssssss" to the end. Attack - Warcry followed by two quick attacks on the opponent. Troll: Damage - 1.5x base enemy damage. Warcry - Base enemy warcry but with the addition of "Grrrrrrrr" to the end. Attack - Warcry followed by a single attack on the opponent. Orc: Damage - 2.0x base enemy damage. Warcry - Base enemy warcry with the addition of "AHHHHHHHHHH" to the end.…Create a C++ console application that implements this inheritance hierarchy. Note the following: The game has no "Enemy" object but it does have specific enemies. (Abstract) All enemies will have the following properties or behaviours • Damage - A value representing how much damage they would do to an enemy. Default enemy damage is 10. • Warcry- A proclaimation of their intent to do battle. Default enemies warcry is "Roar!" . Attack - An ability to combine a warcry with damage. (Ex: "Roar!" "Deal 10 damage to opponent'). Skeleton: • Damage - Base enemy damage 0 Warcry- Base enemy warcry but with the addition of "Hssssssssssss" to the end. 0 Attack - Warcry followed by two quick attacks on the opponent. Troll: ■ Damage - 1.5x base enemy damage. ■ Warcry- Base enemy warcry but with the addition of "Grrrrr" to the end. ■ Attack - Warcry followed by a single attack on the opponent. ■ Ora: Dark Orc: ■ ■ ■ Damage - 2.0x base enemy damage. ■ Warcry- Base enemy warcry with the addition of…Method overriding is combination of inheritance and polymorphism? a) True b) false
- Explain how polymorphism works through inheritance. Be specific. HINT: Use specific C+ keywords, explain about member functions and how to call them.C++ programming Overview This is a demonstration an ability to implement inheritance, composition, and overloaded operators in a program. Pretend to be working in the IT department for a corporation and have been tasked with developing an application to manage assigning people to a team. This process involves creating a team with a name and a purpose, the assignment of people in the team, and the assignment of a person to lead the team. Use inheritance to facilitate the reuse of code and operator overloading to allow the usage of familiar operators tailored specifically to the Person, TeamMember, and Leader classes. Composition is also demonstrated in using a Team class that contains objects of the TeamMember and Leader classes. You will need to develop several classes to maintain this information:Team, Person, TeamMember, Leader, and Date. The characteristics of TeamMember and Leader are shown below: TeamMember: Leader: ID…Q12. Method overriding is combination of inheritance and polymorphism?a) Trueb) false
- Exercise on class inheritance in C++. General requirements: • All data members must be declared as “private” • No global variable is allowed to be declared and used (constants are ok) • Methods within the class and the requested functions cannot have “cin” or “cout” but it should make use of parameters and return value instead unless it is stated explicitly. • “cin” and “cout” should be used in main() or any testing functions • Please make sure that you clearly show how the C++ class, its methods and all the functions are being called and print out its return value and its results properly Please answer the following questions. 1. Define a class named “BooleanVariable” that manages a variable name (string) and a boolean value (true or false). It should not have default constructor. The class must at least provide the following methods: - toString() method that can return a string in the following format: variable-name(variable-boolean-value) such as isSuccessful(true) -…C++ Programming. Theme : Encapsulation and inheritance Task : General setting. The program must contain: • base class X, which includes two elements x1, x2 of type int, • constructor with parameters for creating objects in dynamic memory area, • destructor, • virtual methods for viewing the current state and reinstalling base class objects to a new state. • derived class Y, including one element y of type int , • a constructor with parameters and an initializer list, passing data to the base class constructor, • overridden methods for viewing the current state of objects and reinstalling them to a new state. Create a Run method in the derived class that defines: Value х1×х2-уwrite which of the aspects of object orientated programming and programming in general relate to each of the statements below: Aspects in question:Inheritance, Encapsulation, Polymorphism, Abstraction Statements: Airplane and Pigeon can both fly. Car is a vehicle A Car has 4 wheels, a steering wheel, a brake, a gas pedal and an Engine. Steering wheel, brake and gas pedal are used by the driver to control the engine and the wheels indirectly. A programming teacher’s job is to teach programming; it is not important for me if he can dance! All Mammals reproduce the same way. This printer can print on paper, Envelops and post cards. Motorcycle is essentially a bicycle with an engine. My weekly schedule is a table with days as columns and time as rows.
- Computer Science The home work is you need to develop a program similar to your mobile phones contact. Homework requirements - all functionalities of Contact app should be present in your program( adding contact, searching etc.) - attributes of contact app should be added in your homework implementation. - apply oop concept in you program( Inheritance, abstraction, polymorphism and encapsulation) Note: Use your mobile phone contact app to see the functionalities and attributes. using java language programUSE TEMPLATE PROVIDED AT END OF QUESTION WHILE MAKING SOLUTION ----------------------------------- Write a program to implement Hierarchical Inheritance A class called Bill has the following protected data member variables Datatype Variable name int billNumber string name Include the following member function in the Bill class Member function Description void generateBill() This function is used to display the bill number and customer name. A class called TelePhoneBill inherits the class Bill with the following private data member variables Datatype Variable name int numberOfCallsMade double costPerCall Include a 4 arguments constructor with the arguments in the order (int billNumber, string name, int numberOfCallsMade, double costPerCall). Include the following member function in the TelePhoneBill class Member function Description void display() This function is used to display the telephone bill details A class called CurrentBill inherits the…C++ Define the class bankAccount to implement the basic properties of a bank account. An object of this class should store the following data: Account holder’s name (string), account number (int), account type (string, checking/saving), balance (double), and interest rate (double). (Store interest rate as a decimal number.) Add appropriate member functions to manipulate an object. Use a static member in the class to automatically assign account numbers. Also, declare an array of 10 components of type bankAccount to process up to 10 customers and write a program to illustrate how to use your class. Example output is shown below: 1: Enter 1 to add a new customer. 2: Enter 2 for an existing customer. 3: Enter 3 to print customers data. 9: Enter 9 to exit the program. 1 Enter customer's name: Dave Brown Enter account type (checking/savings): checking Enter amount to be deposited to open account: 10000 Enter interest rate (as a percent): .01 1: Enter 1 to add a new customer. 2: Enter 2 for…
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)
![C++ for Engineers and Scientists](https://www.bartleby.com/isbn_cover_images/9781133187844/9781133187844_smallCoverImage.gif)