Wednesday 24 April 2013

Jim is developing software for automating the slot booking process for a video game parlor. Customers fill the Booking Request form with the details of the game, such as the name, number of players, and complexity level. They hand over the form to the booking officer at the parlor. Depending on the availability, the booking officer reserves the time slots and the play station for customers. Identify the involved classes and objects, and their attributes. Write methods in the class to accept the game details and display them. (Duration: 45 min)


using system ;
public class gamedetials
{

      string fname ;
      string lname ;
      int noofplayer ;
      int level ;
   
      public static void getGameDetail ()
{
      console.writeline (" enter your first name" );
      fname= console.readline();
      console. writeline ( " enter your last name" );
      Lname-console.readline();
      console.writeline( "enter no of players");
      nooFplayer=convert ToInt32(console. readline() )  
      console. writeline(" entercomplexity level number:");
      level= convert ToInt32(console.readline());
          Console.ReadLine();
}




 
public static void showGameDetails()
{
   {
 console. writeline("the details enter are as follows:");
  console. write("first name:");
 console.writeline(fname);
 console.write("last name:");
 console.writeline(lname);
 console.write("no of players:");
 console.writeline(noofplayers);
 console.write("level:");
 console.writeline(level);
     
public static void Main(string []args)
{
GameDetails gd=new GameDetails();
gd.getGameDetials();
gd.showGameDetails();

}
}
                       

No comments:

Post a Comment