Question: 4. Lab Exercise-Convert a Structure to a Class Convert a structure into a class implementation Details: Copy three files plus the Makefile into your directory

4. Lab Exercise-Convert a Structure to a Class

4. Lab Exercise-Convert a Structure to a Class

4. Lab Exercise-Convert a Structure to a Class Convert a structure into a class implementation Details: Copy three files plus the Makefile into your directory by entering the following commands: Epinette /p/class/15/e-structur e lle Modily all of the functions so that they are member functions. Use the scope resolution operator to show that an implementation of a function is part of a dans . Change the initialization function into a constructor with arguments Add a default constructor that initializes things to or empty string, Please note that you should use a for loop to initialize all the values of furColours Add one getter to return the length - Modify the calls in main to reflect the change in the functions. - Be sure to add the keyword const after functions that do not change the data - If you want, you can turn the staller function into an overloaded operator ere are two sample runs that you can try in the lab: cules /main se decribe the cat se enter a length 48 ase enter = height25 enter tail length 31 ase enter an eye colour: blue anter a description of the fur (long diun, short, noe short se enter the colours of the fur (separated by a space or a newline acter). Add done" at the end grey white done average cat has length 16 4. Lab Exercise-Convert a Structure to a Class Convert a structure into a class implementation Details: Copy three files plus the Makefile into your directory by entering the following commands: Epinette /p/class/15/e-structur e lle Modily all of the functions so that they are member functions. Use the scope resolution operator to show that an implementation of a function is part of a dans . Change the initialization function into a constructor with arguments Add a default constructor that initializes things to or empty string, Please note that you should use a for loop to initialize all the values of furColours Add one getter to return the length - Modify the calls in main to reflect the change in the functions. - Be sure to add the keyword const after functions that do not change the data - If you want, you can turn the staller function into an overloaded operator ere are two sample runs that you can try in the lab: cules /main se decribe the cat se enter a length 48 ase enter = height25 enter tail length 31 ase enter an eye colour: blue anter a description of the fur (long diun, short, noe short se enter the colours of the fur (separated by a space or a newline acter). Add done" at the end grey white done average cat has length 16

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!