Advertisement
mmayoub

Ex02P026, Game.cs

Nov 18th, 2021
750
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.57 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4.  
  5. namespace ConsoleApp10
  6. {
  7.     // Ex02 - P026
  8.     class Game
  9.     {
  10.         // part a
  11.         private int code;
  12.         private String name;
  13.         private int minAge;
  14.         private int gamesCount;
  15.         private int gamesError;
  16.  
  17.  
  18.  
  19.         // part b
  20.         public double errorPercent()
  21.         {
  22.             return (double)gamesError / gamesCount * 100;
  23.         }
  24.  
  25.         public int getCode() { return this.code; }
  26.  
  27.         public int getMinAge() { return this.minAge; }
  28.     }
  29.  
  30. }
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement