Question: Please answer all parts a, b, and c. 2. What's wrong with this? fix it. Read the comments if provided for possible clues. For each
Please answer all parts a, b, and c.


2. What's wrong with this? fix it. Read the comments if provided for possible clues. For each item describe what is wrong and what you would do to a. class Dag t int age; 1i int nain) Dog myDog: myDog.age-15; b. struct Cow t int legs; //This function is to fix cows by setting the legs to 4 void FixCows (Cow cowToFix) //who keeps making cows with less than 4 legs? int main) Cow cowl: FixCowscowl); / other thing done with fixed cows here / C. //You've been assigned to debug code written by one of your //co-workers who is a lazy slob. The program //should run for long periods of time. However, after a period of //time it crashes. Below is a section of code class Widgets t public: int widgetParts [10001: //other widget functions here h: //This method is called once per hour void CreateAndUseWidgets) for(int i-0; i 10000; i) Widgets* newwidget new Widgets); //ommited widget manipulation code here //ok now I'm done with this widget after I set this //last value newwidget->widgetParts [10]-5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
