mmayoub

Ex02P026, Game.java, 03.11.2021

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