Home > Back-end >  In c # design help accomplish questions
In c # design help accomplish questions

Time:09-18

Comprehensive application (25 points) (requirements: design a comprehensive program and debug program on the computer, and output the result after the screenshots paste the code below the title)
(1) design an abstract class Animal, has the category, properties, such as speed has called, eat, abstract methods such as preferences;
(2) design, each derived class the Cat and Dog inheriting Animal, asked Cat class implement the abstract methods respectively output (" meow ", "fish", "mouse") and implement abstract methods respectively output in a Dog class (" wang wang ", "eat meat", "hunting");
(3) design the Cat and Dog object, set the category of the Cat object as "Cat", the speed of 30 km/h. Set a Dog object categories for "Dog", speed of 60 km/h, the output of each object's properties and methods, and compare the speed of the object, the comparison results are given,

CodePudding user response:

Suggestions to the C # zone, still have very big distinction, C # and C ~ first clear direction
  • Related