Starting from:

$25

JAVA - Assignment 2  - Solved

1.  Create Java classes having suitable attributes for Library management system.Use OOPs concepts in your design.Also try to use interfaces and abstract classes.  

2.  WAP to create singleton class.

3.  WAP to read words from the keyboard until the word done is entered. For each word except done, report whether its first character is equal   to  its  last character. For the required loop, use a  a)while statement  

b)do-while statement

 

4.  Design classes having attributes for furniture where there are wooden chairs and tables, metal chairs and tables. There are stress and fire tests for each  products.

5.  Design classes having attributes and method(only skeleton) for a coffee shop. There are three different actors in our scenario and i have listed the different  actions they do also below

                                                               * Customer                                             

-  Pays the cash to the cashier and places his order, get a token number back

-  Waits for the intimation that order for his token is ready

-  Upon intimation/notification he collects the coffee and enjoys his drink

  ( Assumption:  Customer waits till the coffee is done, he wont timeout and cancel the order. Customer always likes the drink served. Exceptions like  he not liking his coffee, he getting wrong coffee are not considered to keep the design simple.)

                                                                 

* Cashier                                                                                                                                                                                                                                                                                                                                                                                                                                                                          

-  Takes an order and payment from the customer

-  Upon payment, creates an order and places it into the order queue

-  Intimates the customer that he has to wait for his token and gives him his token

  ( Assumption: Token returned to the customer is the order id. Order queue is unlimited. With a simple modification, we can design for a limited queue size)

                                                                 

* Barista                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

-  Gets the next order from the queue     

-  Prepares the coffee                              

-  Places the coffee in the completed order queue

-  Places a notification that order for token is ready

More products