Monday 30 November 2015

Java assignment 4

1. . You need to analyze the object and information structure in the given scenario and perform the following tasks:
 Identify the primary classes and their relationships. The primary classes should model the courses, trainers, and clients.
 Create the primary classes with their required fields and methods.

Ans  import java.util.*;
class Roomctagory
{
int RoomCatagoryId;
varchar Name;
varchar Description;
float Tarrif;
}


class Booking
{
int BookingId;
varchar CustomerName;
varchar CustomerAddress;
varchar CustomerPhone;
Int RoomId;
Timestamp BookingDateTime;
Timestamp CheckinDate;
Timestamp CheckoutDate;
}
class Room
{
int RoomId;
int RoomCatagoryId;
char Status;
}



class MyClass
{
public static void main(String[] args)
{
System.out.println("RoomCatagory, Booking and Room are the three classes.");
}
}

No comments:

Post a Comment