resizeToMatch main myCirc: Circle public Shape int x int y 100 250 int int width int height 50 50 radius 25 Stack match: Shape int x int y 5 200 int width int height 60 60 Circle circPtr Circle public Shape int y 200 int x int width int height 60 60 int radius 30 Heap The state of memory is shown just as we enter scope of the resizeToMatch function. The function's intent is to change the dimensions of the current Shape to match those of the parameter Shape. The function is a member function of the Shape class, and Circle is a subclass of Shape. The Circle subclass overrides the Shape resizeToMatch function to also update its radius attribute. Which of the following function calls is a valid way to call the resize ToMatch function. A. (+circptr).resizeToMatch (circptr) B. circPtr->resizeToMatch (circptr) C. myCirc. resizeToMatch (+circptr) D. myCirc->resize ToMatch (*circptr)

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter7: Using Methods
Section: Chapter Questions
Problem 20RQ
icon
Related questions
Question
resizeToMatch
main
myCirc: Circle
public Shape
int y
250
int x
100
int
int width int height
50
50
radius
25
Stack
match: Shape
int x int y
5
200
int width int height
60
60
Circle circPtr
Circle
public Shape
int y
200
int x
5
int width int height
60
60
int
radius
30
Heap
The state of memory is shown just as we enter scope of the resizeToMatch function. The
function's intent is to change the dimensions of the current Shape to match those of the parameter
Shape. The function is a member function of the Shape class, and Circle is a subclass of Shape.
The Circle subclass overrides the Shape resizeToMatch function to also update its radius
attribute.
Which of the following function calls is a valid way to call the resize ToMatch function.
A. (*circptr).resizeToMatch (circptr)
B. circPtr->resizeToMatch (circptr)
C. myCirc. resizeToMatch (*circptr)
D. myCirc->resize ToMatch (*circptr)
Transcribed Image Text:resizeToMatch main myCirc: Circle public Shape int y 250 int x 100 int int width int height 50 50 radius 25 Stack match: Shape int x int y 5 200 int width int height 60 60 Circle circPtr Circle public Shape int y 200 int x 5 int width int height 60 60 int radius 30 Heap The state of memory is shown just as we enter scope of the resizeToMatch function. The function's intent is to change the dimensions of the current Shape to match those of the parameter Shape. The function is a member function of the Shape class, and Circle is a subclass of Shape. The Circle subclass overrides the Shape resizeToMatch function to also update its radius attribute. Which of the following function calls is a valid way to call the resize ToMatch function. A. (*circptr).resizeToMatch (circptr) B. circPtr->resizeToMatch (circptr) C. myCirc. resizeToMatch (*circptr) D. myCirc->resize ToMatch (*circptr)
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Concept of pointer parameter
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
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning