Advertisement
callumbinner22

Student class (partly finished)

Apr 6th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.96 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace OBJECTORIENTATEDCODE
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Student Matt = new Student()
  14.             {
  15.                 name = "Matt" ,
  16.                 startdate = "21.09.16",
  17.                 rate = 9000,
  18.              
  19.             };
  20.  
  21.             Matt.Charge();
  22.          
  23.  
  24.         }
  25.     }
  26.  
  27.  
  28.  
  29.  
  30.     class Student
  31.     {
  32.  
  33.  
  34.  
  35.  
  36.        
  37.        
  38.         public string name ;
  39.         public int startdate;
  40.         public double rate;
  41.  
  42.         public void Charge()
  43.         {
  44.            // Console.WriteLine("Number of sides " + this.numberofsides);
  45.           //  Console.WriteLine("Side length " + this.sidelength);
  46.           //  Console.WriteLine("Regular? " + this.regular);
  47.  
  48.             Console.WriteLine(this.rate *this.startdate);
  49.         }
  50.  
  51.        
  52.     }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement