Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Text;
- namespace AquariumAdventure
- {
- public class Fish
- {
- private string name;
- private string color;
- private int fins;
- public Fish(string name, string color, int fins)
- {
- Name = name;
- Color = color;
- Fins = fins;
- }
- public string Name
- {
- get { return name; }
- set { name = value; }
- }
- public string Color
- {
- get { return color; }
- set { color = value; }
- }
- public int Fins
- {
- get { return fins; }
- set { fins = value; }
- }
- public override string ToString()
- {
- string output = $"Fish: {Name}{Environment.NewLine}Color: {Color}{Environment.NewLine}Number of fins: {Fins}";
- return output;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement