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