Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace labb6uppg3
- {
- class Animal
- {
- string name;
- string sound;
- public void makeSound()
- {
- }
- public string Name
- {
- get { return name; }
- set { name = value; }
- }
- public string Sound
- {
- get { return sound; }
- set { sound = value; }
- }
- public class fish : Animal
- {
- private string watertype;
- public string Watertype
- {
- get { return watertype; }
- set { watertype = value; }
- }
- }
- public class salmon : fish
- {
- private string ocean;
- public string Ocean
- {
- get { return ocean; }
- set { ocean = value; }
- }
- }
- public class mammal : Animal
- {
- private string furType;
- public string FurType
- {
- get { return furType; }
- set { furType = value; }
- }
- }
- public class cow : mammal
- {
- private string breed;
- public string Breed
- {
- get { return breed; }
- set { breed = value; }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement