Write a c++ oop code following these instructions only. Class Scene: capture_date : int draw() : void // Abstract method Class Landscape: area : double render(): void Class FlightSimulator: It has aggregation relationship with abstract class Redefine draw() function that has only a print statement of “Drawing Scene”. Class MountainScene: Call render function of Landscape as mentioned in diagram. (a) Add a function getArea() in 'Scene' class. Class Scene: capture_date : int draw() : void // Abstract method getArea() : string // Displays 'Area of Scene' Class CityScene: draw() : void getArea() : string // Displays 'Area of City Scene' Class MountainScene: draw() : void getArea() : string // Displays 'Area of Mountain Scene' (b) 1- Create a pointer of Scene class 2- Assign object of MountainScene class to the pointer created in part 1 3- Call getArea() through the pointer 4- Report the output you get in part 3

COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN:9780357392676
Author:FREUND, Steven
Publisher:FREUND, Steven
Chapter10: Data Analysis With Power Tools And Creating Macros
Section: Chapter Questions
Problem 12EYW
icon
Related questions
Question

Write a c++ oop code following these instructions only.

Class Scene:

capture_date : int

draw() : void   // Abstract method

Class Landscape:

area : double

render(): void

Class FlightSimulator:

It has aggregation relationship with abstract class

Redefine draw() function that has only a print statement of “Drawing Scene”.

Class MountainScene:

Call render function of Landscape as mentioned in diagram.

(a) Add a function getArea() in 'Scene' class.

Class Scene:

capture_date : int

draw() : void // Abstract method

getArea() : string // Displays 'Area of Scene'

Class CityScene:

draw() : void

getArea() : string // Displays 'Area of City Scene'

Class MountainScene:

draw() : void

getArea() : string // Displays 'Area of Mountain Scene'

(b) 1- Create a pointer of Scene class

    2- Assign object of MountainScene class to the pointer created in part 1

    3- Call getArea() through the pointer

    4- Report the output you get in part 3   

FlightSimulator
CityScene
draw()
Scene
(abstract)
draw() (abstract)
MountainScene
draw()
Landscape
render()
landscape.render()
Transcribed Image Text:FlightSimulator CityScene draw() Scene (abstract) draw() (abstract) MountainScene draw() Landscape render() landscape.render()
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L