Question: Project Index ( static ) Configure x Collapse Introduction to Objects Coding Exercises: Objects ( 6 ) Exercise 5 Exercise 5 The Bigcat class helps
Project Index static
Configure
Collapse
Introduction to Objects Coding Exercises: Objects
Exercise
Exercise
The Bigcat class helps to record information on the animals in the Panthera genus tiger lion, jaguar, leopard, and snow leopard Since all animals are in the same genus, the object will have the default class attribute genus with the string value panthera. The constructor accepts the following parameters in this order:
species string with the species of the animal, eg "tigris"
commonName string with the common name of the animal, eg "tiger"
habitat vector of strings with common locations of the animal, egtropical rainforests", "grasslands" "temperate forests"
Your task is to construct a Bigcat object called snowleopard so that when the program runs and prints the information on snowleopard, you will get the following result:
Expected Result:
A snow leopard is part of the uncia species.
Their genus class is panthera.
some of their habitats include: Himalaya mountains, Siberian mountains,
DO NOT CHANGE the existing code in main.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
