Introduction:
In this assignment a web application for Country Kitchen Classics Web User Interface is developed. The application is used by the customers to order meals. This helps the owners of Country Kitchen Classics to sell their gourmet frozen meals over the Internet. The user interface helps the customer to register themselves with the site in order to book their meals. The customer register with their information like name, phone number, email address, address and credit card number. After successful registration the user is provided with the unique customer id. The website is loaded with the information about the meals that are sold by them. The meals information like name, price and description are stored by the application. Each meal is uniquely identified by the meal id. The customer after registration view the meals and then order with the quantity specified. While ordering for the items the customer the shipping methodology. The Country Kitchen Classics follows two shipping method namely the regular shipping and overnight shipping. The interface also maintains the order details. The order details maintained by the interface includes the order id, order date, customer id of the customer who makes the order, id of the shipping clerk who is going to deliver the order. The shipping clerk of Country Kitchen Classics is assigned the responsibility to view the orders dispatch details and deliver the meals in time. The staff of Country Kitchen Classics is assigned the functionality to add meal information to the website and to view the meal information. The administrator is provided with the functionality of sales report generation and maintain the inventory details. This report analyzes the business requirements of country kitchen classics and then a use case and class diagram are designed accordingly. With UML diagrams the data type of the attributes in the class diagram are specified in the table format. To end with a java implementation of the three classes is provided.
Case Study 1:
Specify Use cases (minimum of six) for the design of Country Kitchen Classics Web User Interface specifying the actors. Provide possible scenarios (minimum of two) for each Use case. (Use UML notation)
Solution:
Use case diagram is a behavioural diagram which is used to describe the set of use cases of the system. These use cases are performed by the actors involved in the system. Each action in use case diagram is produces observable result to the actors of the system.
Two types of use case diagram are:
- Business Use Case Diagram
- System Use Case Diagram
The use case diagram for Country Kitchen Classics Web User Interface is shown below. The use case diagram is constructed after analysing the various aspects of the system and actions performed by actors of the system.
![]()
Case Study 2:
Determine the classes that are required for the design (minimum of four classes). All classes need to be given a meaningful name.
Solution:
Class diagram or structural diagram is a static diagram which represents the static view of the system/application. It is used for modelling object oriented system. Class diagram are used for describing, visualizing, constructing executable code, documenting different system aspects. The class diagram represents the attributes, operations and constraints of class.
Some of the class diagram purposes are:
- Used for constructing the deployment and component diagram
- Used for forward and reverse engineering
- Used for describing the responsibilities of the system
The class diagram for Country Kitchen Classics Web User Interface is shown below. The class diagram is constructed after analysing various system aspects.
![]()
Case Study 3:
Assign attributes for the classes specifying the data type, the possible range of values (meaningful names should be given).
Customer
Attribute Name
|
Data Type
|
cust_id
|
int
|
cust_name
|
String
|
cust_phoneNumber
|
BigInteger
|
cust_emailAddress
|
String
|
cust_address
|
String
|
cus_creditCardNumber
|
BigInteger
|
ShippingClerk
Attribute Name
|
Data Type
|
clerk_id
|
int
|
clerk_name
|
String
|
clerk_phoneNumber
|
BigInteger
|
clerk_address
|
String
|
clerk_salary
|
float
|
Meals
Attribute Name
|
Data Type
|
meal_id
|
int
|
meal_name
|
String
|
meal_price
|
Float
|
meal_description
|
String
|
Order
Attribute Name
|
Data Type
|
order_id
|
int
|
order_date
|
Date
|
cust_id
|
int
|
clerk_id
|
int
|
Ordered Meals
Attribute Name
|
Data Type
|
order_id
|
int
|
meal_id
|
int
|
quantity
|
int
|
Regular Shipping
Attribute Name
|
Data Type
|
shipping_cost
|
float
|
delivery_date
|
Date
|
Overnight Shipping
Attribute Name
|
Data Type
|
shipping_cost
|
float
|
Case Study 4:
Provide the class declaration for three of the classes and a simple implementation of initialization of data types of the classes. And provide a display() method that outputs the data types to the console.
class Customer{
int cust_id;
String cust_name;
BigInteger cust_phoneNumber;
String cust_emailAddress;
String cust_address;
BigInteger cust_creditCardNumber;
void display()
System.out.println("n Attributes - Data Type");
System.out.println("n cust_id-int");
System.out.println("n cust_name-String");
System.out.println("n cust_phoneNumber-BigInteger");
System.out.println("n cust_emailAddress-String");
System.out.println("n cust_creditCardNumber-BigInteger");
class ShippingClerk{
int clerk_id;
String clerk_name;
BigInteger clerk_phoneNumber;
String clerk_address;
float clerk_salary;
void display()
System.out.println("n Attributes - Data Type");
System.out.println("n clerk_id-int");
System.out.println("n clerk_name-String");
System.out.println("n clerk_phoneNumber-BigInteger");
System.out.println("n clerk_address-String");
System.out.println("n clerk_salary-float");
class Meals{
int meal_id;
String meal_name;
float meal_price;
String meal_description;
void display()
System.out.println("n Attributes - Data Type");
System.out.println("n meal_id-int");
System.out.println("n meal_name-String");
System.out.println("n meal_price-float");
System.out.println("n meal_description-String");
Conclusion:
Thus in this report the business case of the Country Kitchen Classics Web User Interface is analysed. The actors and use cases involved in the use case diagram is determined from requirement document. For class diagram the class name, its attributes and the data type of them is determined. The implementation of the class is done using Java. The implemented Java class contains the display function which displays the data type of its attribute.
References:
- Russ Miles, Kim Hamilton, “Learning UML 2.0”, 1Ed, OReilly Media Inc., 2006, pp. 1-40.
- Dan Pilone, “UML Pocket Reference”, 1Ed, OReilly Media Inc., 2003.
- Terry Halpin, Keng Siau, “Unified Modeling Language: Systems Analysis, Design and Development Issues”, IDEA Group Publishing.