CHALLENGE ACTIVITY 415564.2578008.qx3zqy7 Jump to level 1 Read two integers as the age and the weight of a Lion object.

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

CHALLENGE ACTIVITY 415564.2578008.qx3zqy7 Jump to level 1 Read two integers as the age and the weight of a Lion object.

Post by answerhappygod »

Challenge Activity 415564 2578008 Qx3zqy7 Jump To Level 1 Read Two Integers As The Age And The Weight Of A Lion Object 1
Challenge Activity 415564 2578008 Qx3zqy7 Jump To Level 1 Read Two Integers As The Age And The Weight Of A Lion Object 1 (68.68 KiB) Viewed 20 times
CHALLENGE ACTIVITY 415564.2578008.qx3zqy7 Jump to level 1 Read two integers as the age and the weight of a Lion object. Declare and assign pointer myLion with a new Lion object using the age and the weight as arguments in that order. Then call myLion's IncreaseWeight() member function. Ex: If the input is 4 432, then the output is: 1.3.3: Operators: new, delete, and ->. Lion's weight is increased. Lion's age: 4 Lion's weight: 4320 cout << "Lion's 22 23 24 } 25 19 20 } 21 void Lion::Print() { 29 30 26 27 int main() { 28 31 32 33 34 35 36 } weight is increased." << endl; cout << "Lion's age: << age << endl; "1 cout << "Lion's weight: << weight << endl; myLion->print(); return 0; 11 /* Additional variable declarations go here */ /* Your code goes here */ 1 ✓ 2 D❤D+D"
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply