be-cse-vii sem - 87808-casetoolslab-manual.pdf
TRANSCRIPT
ANNAMALAI UNIVERSITYDepartment of Computer Science and
Engineering
LAB MANUALfor
87808 - CASE TOOLS LAB
2014 - 2015
Lab In-charges
A1 - Batch - Dr. T. S. Subhashini
A2 - Batch - Dr. R. Priya
B - Batch - Mr. G. Ramachandran
C - Batch - Dr. R. MadhanMohan
ANNAMALAI UNIVERSITYDepartment of Computer Science and Engineering
List of Experiments87808 - CASE TOOLS LAB
PROGRAMME: B.E. (CSE) SEMESTER: VIIYEAR : Final Year BATCH: A, B & C
CYCLE – I
1. Study Of UML
2. Create a UML model for On line Purchase System
3. Create a UML model for Library Management System
4. Create a UML model for E- Ticketing
5. Create a UML model for Quiz System
6. Create a UML model for Student Mark Analyzing System
7. Create a UML model for E-Mail Client System
8. Create a UML model for Telephone Phone Dialing
9. Create a UML model for Point of sale
10. Create a UML model for a Working Company
CYCLE – II
11. Create a system to design Bank ATM Transactions and generate code
by using MS-Access as back end and VB as the front end.
12. Create a system to design Student mark analysis system and generate code
by using MS-Access as back end and VB as the front end.
13. Create a system to design Employee payroll system and generate code
by using MS-Access as back end and VB as the front end.
14. Create a system to design Airline Ticket Reservation System and generate code
by using MS-Access as back end and VB as the front end.
15. Create a system to design Course Registration System and generate code
by using MS-Access as back end and VB as the front end.
Ex. No 1STUDY OF UML
AIM:-To study the basic concepts of Unified Modeling Language.
UML NOTATION Unified Modeling Language.
Set of notations and conventions used to describe and model an application.
Universal language for modeling systems.
Standard notation for OO modeling systems.
Does not specify methodology to develop an application.
UML DIAGRAMS Class Diagram
Use Case Diagram
Behavioral Diagram
Interaction Diagram
Sequence Diagram
Collaboration Diagram
State Chart Diagram
Activity Diagram
Implementation Diagram
Component Diagram
Deployment Diagram
CLASS DIAGRAM Shows the static structure of the model.
Collection of static modeling elements such as classes and their relationships
connected as a graph.
Provides visual representation of objects, relationships and their structures.
Class:-
A class is a set of objects that share a common structure and common behavior.
It is represented as:
Interface:-
Specifies the externally-visible operations of a class and/or component.
Association:-
Model properties of associations.
The properties are stored in a class and linked to the association relationship.
Example,
Generalization:-
A generalize relationship is a relationship between a more general class or use
case and a more specific class or use case.
Example,
<Class Name>
<Attributes>
<Operations>
Bank Account Person
USE CASE DIAGRAM Set of use cases enclosed by system boundary, communication association
between actors and use cases, and generalization among use cases.
Actors:-
External factors that interacts with the system from the user's perspective.
Use Cases:-
Set of scenarios that describe how actor uses the system.
Represented as,
Relationship:-
Communication – communications with the use case normally.
Uses – Shown by generalization arrow from the use cases.
Extends – Used when one case does more than another that is similar to it.
BEHAVIOR DIAGRAMINTERACTION DIAGRAM
Vehicle
TruckBus Car
Diagrams that describes how group of objects are collaborated.
SEQUENCE DIAGRAM:
Describes the behavior of the system through interaction between the system and
the environment in time sequence.
Two dimensions:
Vertical dimension – represents time.
Horizontal dimension – represents objects.
Life line – Object's existence during the interaction.
<Event>
COLLABORATION DIAGRAM:
An interaction diagram that shows the order of messages that implement an
operation or a transaction.
Collaboration diagrams show objects, their links, and their messages.
1. <Event>
Object:-
An object has state, behavior, and identity.
Objects interact through their links to other objects.
Link:-
Object 1 Object 2
Object 1 Object 2
A link is an instance of an association, analogous to an object.
Message:-
A message is the communication carried between two objects that trigger an
event.
STATECHART DIAGRAM
Models the dynamic behavior of individual classes or any other kind of object.
Shows the sequences of states, events, and actions.
State:-
Represents a condition or situation during the life of an object during which it
satisfies some condition or waits for some event.
Start State:-
Shows the beginning of workflow.
End state::-
Represents the final or terminal state.
ACTIVITY DIAGRAM
Used for modeling the sequence of activities in a process
<State>
Special case of a state machine in which most of the states are activities and most
of the transitions are implicitly triggered by completion of the actions in the
source activities.
Activity:-
Represents the performance of task or duty in a workflow.
Swim lanes:-
Represents organizational units or roles within a business model.
IMPLEMENTATION DIAGRAM Shows the implementation phase of system development.
Two types of implementation diagrams:
Component diagram
Deployment diagram
COMPONENT DIAGRAM
Models the physical components in the design.
A graph of the design’s components connected by dependency relationships.
Includes concept of packages.
Package is used to show how classes are grouped together.
DEPLOYMENT DIAGRAM
Shows the configuration of runtime processing elements and software
components.
It is a graph of nodes connected by communication association.
Nodes are the components that are connected to other components through
dependencies.
<Activity>
Used in conjunction with component diagrams to show the distribution of
physical modules.
RESULT:-Thus the different conceptual models under UML have been studied.
Ex. No 2
ONLINE PURCHASE SYSTEM
AIM:
To Create a UML model for On-Line Purchase System.
1. ANALYSIS
1.1 Identifying the Actors
1.2 Identifying the Use Cases
2. REQUIREMENTS
2.1 System Requirements
2.2 Software Requirements
3. DESIGN
3.1 Use Case Diagram
3.2 Class Diagram
3.3 Sequence Diagram
3.4 Collaboration Diagram
3.5 Activity Diagram
3.6 State Diagram
ANALYSIS
Identifying the Actors
Customer
Software
Banking
Dealer
Identifying the Use Cases
Browse Catalog
Select Item
Request Item
Payment Details
Issue Details
Authentication
Check for validity
Issue Goods
REQUIREMENTS
System Requirements
Processor : Pentium IV 1.7
RAM : 128 MB
Hard Disk : 40 GB
Software Requirements
CASE Tool: Argo UML 0.30.2
ONLINE PURCHASE USE CASE DIAGRAM
OnlinePurchase
Customer
Software
Banking
Dealer
Check forvalidity
Deliever Goods
IssueAuthorization
Issue Details
Ask for Payment &Shipping details
Select Item
Browse Catlog
Request Item
ONLINE PURCHASE CLASS DIAGRAM
ShoppingCardAttributes
public float subtotalpublic float salesmoneypublic float totalmoney
Operationspublic ShoppingCard()public float getSubtotal()public void setSubtotal(float val )public float getSalesmoney()public void setSalesmoney(float val )public float getTotalmoney()public void setTotalmoney(float val )public void placeOrder()public void removeOrder()public Customervoid[0..*] getCustomer()public void setCustomer(Customer val[0..*] )public CreditCardvoid[0..*] getCreditCard()public void setCreditCard(CrdeitCard val[0..*] )public Customer[0..*] getCustomer()public void setCustomer(Customer val[0..*] )public CreditCard[0..*] getCreditCard()public void setCreditCard(CreditCard val[0..*] )
CustomerAttributes
private string addrtoshipprivate string nameprivate string addrtobillprivate string emailaddprivate int creditrating
Operationspublic Customer()public string getAddrtoship()public void setAddrtoship(string val )public string getName()public void setName(string val )public string getAddrtobill()public void setAddrtobill(string val )public string getEmailadd()public void setEmailadd(string val )public int getCreditrating()public void setCreditrating(int val )public void displayCategory()public void selectItem()public void delieverItem()public void removeOrder()
ItemOfPurchaseAttributes
private int quantityprivate float priceperitem
Operationspublic ItemOfPurchase()public int getQuantity()public void setQuantity(int val )public float getPriceperitem()public void setPriceperitem(float val )public Customer fetCustomer()public void setCustomer(Customer val )public Product[0..*] getProduct()public void setProduct(Product val[0..*] )public Product[0..*] getProduct()public void setProduct(Product val[0..*] )
CreditCardOperations
public CreditCard()public int getNumber()public void setNumber(int val )public date getExpirydate()public void setExpirydate(date val )public boolean getIssue()public void setIssue(boolean val )public void authorizeCharge()public Preffered()public ItemOfPurchase getItemOfPurchase()public void setItemOfPurchase(ItemOfPurchase val )public PrefferedCustomer[0..*] getPrefferredCustomer()public void setPrefferredCustomer(PrefferedCustomer val[0..*] )public PrefferedCustomer[0..*] getPrefferedCustomer()public void setPrefferedCustomer(PrefferedCustomer val[0..*] )
PrefferedCustomerAttributes
private int discountrateOperations
public PrefferedCustomer()public int getDiscountrate()public void setDiscountrate(int val )public Customer getCustomer()public void setCustomer(Customer val )public Customer getCustomer1()public void setCusotmer1(Customer val )public Customer getCustomer()public void setCustomer(Customer val )
ProductAttributesOperations
public Product()
1
*
mProduct
1
mCustomer
1*
mCreditCard 1
1
mCustomer
mPrefferedCustomer
* 1
ONLINE PURCHASE SEQUENCE DIAGRAM
: Customer
: Shoppingcart : creditcard
public void brow secatalog()
public void displaycatalog()
public void selec tItem()
public void getCreditRating()public void getA ddrToShop()
public void setCreditCard()
public void shipmentDetails ()
public void authorizedCharge()
public void authorize()
public void getExpiryDate()
validation
public void setCrediting(int val )
public void setA ddrToShip()
public void deleverItem()
public void rejec ted()
public void removeOrder()
ONLINE PURCHASE COLLABORATION DIAGRAM
: C ustomer
: Shoppingcart
: creditcard
public void brow secatalog()
public void displaycatalog()public void selec tItem()
public void getCreditRating()
public void getA ddrToShop()
public void setCreditCard()
public void shipmentDetails ()
public void setCrediting(int val )
public void setA ddrToShip()
public void deleverItem()
public void removeOrder()
public void authorizedCharge()
public void authorize()
public void rejec ted()
public void getExpiryDate()
ONLINE PURCHASE ACTIVITY DIAGRAM
OnlinePurchaseCustomer Shoppingcart Creditcard
BrowseCatlog
{ From OP_Activity }
SelectingCatlog
{ From OP_Activ...
Selecting &
{ From OP_Activit...
Issuingpayment
{ From OP_Activity }
DelieveringItem
{ From OP_Activity }
DisplayingCatlog
{ From OP_Activity }
Displaying ....
{ From OP_Activity }
Requesting
{ From OP_Activity }
Acceptingdelivery
{ From OP_Activity }
Authorized
{ From OP_Activity }
Rejected{ From OP_Activity }
Validatingcredit
{ From OP_Activity }
Unnamed
Unnamed
Unnamed
ONLINE PURCHASE STATECHART DIAGRAM
CHECKING
PROCESS
DELIVERY
DISPATCH
WAITING
CANCELLING
EXIT
RESULT:-
Thus the UML models for the Online Purchase System have been developed and
verified.
Ex. No 3
LIBRARY MANAGEMENT SYSTEM
AIM:
To Create a UML model for Library Management System.
1. ANALYSIS
1.1 Identifying the Actors
1.2 Identifying the Use Cases
2. REQUIREMENTS
2.1 System Requirements
2.2 Software Requirements
3. DESIGN
3.1 Use Case Diagram
3.2 Class Diagram
3.3 Sequence Diagram
3.4 Collaboration Diagram
3.5 Activity Diagram
3.6 State Diagram
ANALYSIS
Identifying the Actors
Student
Computer
Publisher
Librarian
Identifying the Use Cases
Login
Request Book
Book Details
Collect Books
Order Books
Issue Books
Database
REQUIREMENTS
System Requirements
Processor : Pentium IV 1.7
RAM : 128 MB
Hard Disk : 40 GB
Software Requirements
CASE Tool : Argo UML 0.30.2
USE CASE DIAGRAM
login
Request book
Order books
database
Book details
Publisher
Student
Computer
LibrarianIssue books
Collect books
CLASS DIAGRAM
StudentAttributes
private int scodeprivate String sname
Operationspublic Student()public int getScode()public String getSname()public void setSname(String val )public void viewBookStatus()public void requestBook()public void returnBook()public void setScode(int val )
LibrarianAttributesOperations
public void issueBook()public void orderBook()public void issueCard()public void update()public Librarian()
DatabaseAttributes
private int bookidprivate String booknameprivate String authornameprivate int accessno
Operationspublic Database()public int getBookid()public void setBookid(int val )public String getBookname()public void setBookname(String val )public String getAuthorname()public void setAuthorname(String val )public int getAccessno()public void setAccessno(int val )
PublisherAttributes
private int ordernoprivate String orderbookname
Operationspublic Publisher()public int getOrderno()public void setOrderno(int val )public void setOrderbookname(String val )public String getOrderbookname()
1..*
1..*
SEQUENCE DIAGRAM
Student :Database :
Librarian :Publisher :
login
login valid
public void bookStatus()
bookavailable
public void requestBook()
validation
issueBook
publc void receiveBook()
public void returnBook()
update
public void orderBooks()
public void deliverbook()
public void updateNew Arrivals()
ACTIVITY DIAGRAM
LibrarySystemStudent Librarian Computer
Receiving BooksBook issue
Request for books
View Book Status
Return books
Login
Database
Book updationBook Available
Book not Avilable
STATE CHART DIAGRAM
S tu d en t ID
S ID
ID Accep ted
W ro n g ID - re -en ter
ID accep ted
L ib rary M ain M en u
Enter Id number
Prepare f or nex t s e lec tion
Correc t
W rong Id no.
Re-enter id
Selec t f rom main menu
s elec t f rom main menu
RESULT:-
Thus the UML models for the Library Management System have been developed and
verified.
Ex. No 4
E - TICKETING
AIM:
To Create a UML model for E-Ticketing System.
1. ANALYSIS
1.1 Identifying the Actors
1.2 Identifying the Use Cases
2. REQUIREMENTS
2.1 System Requirements
2.2 Software Requirements
3. DESIGN
3.1 Use Case Diagram
3.2 Class Diagram
3.3 Sequence Diagram
3.4 Collaboration Diagram
3.5 Activity Diagram
3.6 State Diagram
ANALYSIS
Identifying the Actors
Passenger
Clerk
Identifying the Use Cases
Update Customer DB
Validation
Service ATM
Cash to Customer
Bill to Customer
Credit Cards
Payment
Reservation Form
Reservation Chart
Cash Mode
Ticket Confirm
REQUIREMENTS
System Requirements
Processor : Pentium IV 1.7
RAM : 128 MB
Hard Disk : 40 GB
Software Requirements
CASE Tool : Argo UML 0.30.2
E-TICKETING USE CASE DIAGRAM
Updatecustomer DB
Validation
ServiceATMCash tocustomer
Bill to customer
Cridit cards PaymentsResevation
Form
Cash mode ResevationChartTicket Confirm
Clerk
Passenger
E-TICKETING CLASS DIAGRAM
PassengerAttributes
private string pnameprivate long Ageprivate string Sexprivate date DOJ
Operationspublic Passenger()public string getPname()public void setPname(string val )public long getAge()public string getSex()public void setSex(string val )public date getDOJ()public void setDOJ(date val )public void setAge(long val )
Train_DetailsAttributes
private long noprivate String destinationprivate String tnameprivate String sourceprivate lonf depatiretimeprivate long arrivaltime
Operationspublic Train_Details()public long getNo()public void setNo(long val )public String getDestination()public void setDestination(String val )public String getTname()public void setTname(String val )public String getSource()public void setSource(String val )public lonf getDepatiretime()public long getArrivaltime()public void setArrivaltime(long val )public void setDepatiretime(lonf val )
Train_SeatdetailsAttributes
private long tnoprivate date DOJprivate long seatsprivate int coaches
Operationspublic Train_Seatdetails()public long getTno()public void setTno(long val )public date getDOJ()public void setDOJ(date val )public long getSeats()public void setSeats(long val )public int getCoaches()public void setCoaches(int val )
ReservationAttributes
private long tnoprivate date DOJprivate long seatnoprivate int nopprivate int Coaches
Operationspublic Reservation()public long getTno()public void setTno(long val )public date getDOJ()public void setDOJ(date val )public long getSeatno()public void setSeatno(long val )public int getNop()public void setNop(int val )public int getCoaches()public void setCoaches(int val )public void reservatio()
PaymentAttributes
private float AmountOperations
public Payment()public float getAmount()public void setAmount(float val )
1..*
1..*1..*
1..*
E-TICKETING SEQUENCE DIAGRAM
: Passenger
: Reservation : TrainDetails : Train Seat Details : Payment
public void reservatio()
public void gettraindetails()
public void checkavailability()
public void paymentcalc()
public void getpayment()
public void issueticket()
public void updatet_trainseats()
E-TICKETING COLLABORATION DIAGRAM
: Train_Details : Reservation
: Train_SeatDetails
: payments
: Passenger
public long getTno()
public long getSeatno()
public void paymentcalc()
public void reservatio()
E-TICKETING ACTIVITY DIAGRAM
Passenger Reservation TrainDeatails Seatdetails
Check traindetails
{ From eticketa...
Reservetickets
{ From eticketa...
MakePayments
{ From eticketactivi...
Show traindetails
{ From eticketactivity }
RequestPayment
{ From eticketa...
IssueTicket
{ From eticket...
Check seatavailability
{ From eticketa...
E-TICKETING STATE CHART DIAGRAM
REQUEST FOR CREDITCARD NUMBER
CREDIT AGENCY
VALIDATIONCOMPLETED
TRANSACTIONOVER
RESULT:-
Thus the UML models for the E – Ticketing System have been developed and verified.
Ex. No 5
QUIZ SYSTEM
AIM:
To Create a UML model for Quiz System.
1. ANALYSIS
1.1 Identifying the Actors
1.2 Identifying the Use Cases
2. REQUIREMENTS
2.1 System Requirements
2.2 Software Requirements
3. DESIGN
3.1 Use Case Diagram
3.2 Class Diagram
3.3 Sequence Diagram
3.4 Collaboration Diagram
3.5 Activity Diagram
3.6 State Diagram
ANALYSIS
Identifying the Actors
Administrator
Course
Professor
Student
Billing
Identifying the Use Cases
Maintain Student Information
Maintain Subject Information
Done Registration
View Report Card
Register Course
Select subjects to teach
Check for validity
Submit grades
REQUIREMENTS
System Requirements
Processor : Pentium IV 1.7
RAM : 128 MB
Hard Disk : 40 GB
Software Requirements
CASE Tool : Argo UML 0.30.2
USE CASE DIAGRAM
CLASS DIAGRAM
SEQUENCE DIAGRAM
COLLABORATION DIAGRAM
ACTIVITY DIAGRAM
STATECHART DIAGRAM
RESULT:-
Thus the UML models for the Quiz System have been developed and verified.
Ex. No 6
STUDENT MARKS ANALYSIS SYSTEM
AIM:
To Create a UML model for Student Mark Analysis System.
1. ANALYSIS
1.1 Identifying the Actors
1.2 Identifying the Use Cases
2. REQUIREMENTS
2.1 System Requirements
2.2 Software Requirements
3. DESIGN
3.1 Use Case Diagram
3.2 Class Diagram
3.3 Sequence Diagram
3.4 Collaboration Diagram
3.5 Activity Diagram
3.6 State Diagram
ANALYSIS
Identifying the Actors
Administrator
Course
Professor
Student
Billing
Identifying the Use Cases
Maintain Student Information
Maintain Subject Information
Done Registration
View Report Card
Register Course
Select subjects to teach
Check for validity
Submit grades
REQUIREMENTS
System Requirements
Processor : Pentium IV 1.7
RAM : 128 MB
Hard Disk : 40 GB
Software Requirements
CASE Tool : Argo UML 0.30.2
USE CASE DIAGRAM
CLASS DIAGRAM
SEQUENCE DIAGRAM
COLLABORATION DIAGRAM
ACTIVITY DIAGRAM
STATECHART DIAGRAM
RESULT:-
Thus the UML models for the Student Marks Analysis System have been developed and
verified.
Ex. No 7
E-MAIL CLIENT SYSTEM
AIM:
To Create a UML model for E-Mail Client System.
1. ANALYSIS
1.1 Identifying the Actors
1.2 Identifying the Use Cases
2. REQUIREMENTS
2.1 System Requirements
2.2 Software Requirements
3. DESIGN
3.1 Use Case Diagram
3.2 Class Diagram
3.3 Sequence Diagram
3.4 Collaboration Diagram
3.5 Activity Diagram
3.6 State Diagram
ANALYSIS
Identifying the Actors
Administrator
Course
Professor
Student
Billing
Identifying the Use Cases
Maintain Student Information
Maintain Subject Information
Done Registration
View Report Card
Register Course
Select subjects to teach
Check for validity
Submit grades
REQUIREMENTS
System Requirements
Processor : Pentium IV 1.7
RAM : 128 MB
Hard Disk : 40 GB
Software Requirements
CASE Tool : Argo UML 0.30.2
USE CASE DIAGRAM
CLASS DIAGRAM
SEQUENCE DIAGRAM
COLLABORATION DIAGRAM
ACTIVITY DIAGRAM
STATE CHART DIAGRAM
RESULT:-
Thus the UML models for the Email Client System have been developed and
verified.
Ex. No. 8 TELEPHONE DIALING
AIM:
To Create a UML model for Telephone Dialing System.
ANALYSIS
Identifying the Actors
Identifying the Use Cases
REQUIREMENTS
System Requirements
Processor : Pentium IV 1.7
RAM : 128 MB
Hard Disk : 40 GB
Software Requirements
CASE Tool : Argo UML 0.30.2
Sequence diagram :-
caller exchange talker
1: lift receiver
2: dialtone
3: dial digit
4: route
5: phone ring
6: ringing tone
7: answer phone
8: stop ringing
9: stop tone
Collaboration diagram:-
caller exchange
talker
1: lift receiver
2: dialing
3: dial digit 4: route
6: ringing tone9: stop tone
5: phone rings
7: answer phone
8: stop ringing
Result:
Thus the UML models for the Telephone Dialing System have been developed
and verified.
Ex. No. 9 POINT OF SALE
AIM:
To Create a UML model for Point of Sale System.
ANALYSIS
Identifying the Actors
Identifying the Use Cases
REQUIREMENTS
System Requirements
Processor : Pentium IV 1.7
RAM : 128 MB
Hard Disk : 40 GB
Software Requirements
CASE Tool : Argo UML 0.30.2
Sequence diagram:-
cashier system tax collector credit authorizationservice
accounts
1: make new sales()
2: enter item()
3: description()
4: end sales()
5: taxline items = getTaxes()
6: total wih Taxes()
7: make payment()
8: change receipt()
9: reply = request approval()
10: post receivable
11: post sales
Collaboration diagram:-
cashier tax collector
credit authorization service
accouts
system
1: make new sales
2: enter items
3: description
4: end sales
6: total with taxes
7: make payments
8: change receipt
5: tax line item = getTaxes
9: reply = request approval
10: post receivable
11: post sales
Result:
Thus the UML models for the Point of Sale System have been developed and
verified.
Ex. No. 10 WORKING COMPANY
AIM:
To Create a UML model for Working Company System.
ANALYSIS
Identifying the Actors
Identifying the Use Cases
REQUIREMENTS
System Requirements
Processor : Pentium IV 1.7
RAM : 128 MB
Hard Disk : 40 GB
Software Requirements
CASE Tool : Argo UML 0.30.2
Sequence Diagram for use case – 1:
:user disp : Display :Loan amount : CashAccount
details : CompanyDetails
requestLoan()
getDetails
returnDetails()
Loan(amt,dur)
credit(amt)
updateDisplay()
balance()
amount
Sequence diagram for user case 2:
:user disp : Display amount : CashAccount
MachineClass factory : Factory
purchaseMachine()
balance()
amount()
getStaticDetails()
cost, overload, output, rawcost
howManyMachines()
numberOfMachines
confirm
updateDisplay()
debitCost
addMachine(Machine)
balance()
amount
Simulated company for use case 3:
:User disp:Display factory:Factory MachineClass market:Market production:Production
sales:Sales
nextTurn
capacity
mcoutput
output
number
projectedPrice()
nextTurn(numbertaken,price,salesprice)
getProductionDetails()
recordNumber()
recordSalesPrice()
getNumberInStock()
stock
getProjectedPrice()
projectedPrice()
getProjectedSales()
projectedSales()
adjustProjectedPrice()
setEndStock(number)
adjustProjectedSales() recordNumberSold(count)
calculate
grossProfit()
Instance level collaboration diagram:
: Simco Cash : CashAccount
factory : Factory
Prod : ProductionRun
market : Market
sales : Sales
details : CompanyDetails
disp : Display
1: Create2: setBalance(amount)
3: Create
4: Create
8: Create
5: Create
6: Create
7: Create
Specification level collaboration diagram:-
:Simco /CompanyAccount :CashAccount
/CompanyProductionRun : ProductionRun
/ProductionFactory : Factory
/MarketDetails :Market
/SalesDetails :Sales
/CompanyDetails :CompanyDetails
/UserDisplay :Display
Instance level collaboration diagram for usecase 1:
1: RequestLoan
: User
disp :Display
: Loan details : CompanyDetails
cash : CashAccount
2: 3 : Loan ( amount,duration) 3: 5 : addLoan(Loan)
Specification level collaboration for usecase – 1:
/UserDisplay :Display
Loan
/CompanyAccount :CashAccount
/companyDetails :CompanyDetails
1...* 1...*
1...*
Instance level collaboration diagram for usecase – 2
:User
disp : Display
cash : CashAccount :Machine factory : Factory
:MachineClass
1: Purchase Machines
8: Machine7: numberOfMachines := howManyMachines()
3: cost = mCost()4: output = moutput()5: o_h : mOverhead()6: rawCost : mcrawcost()
2: Balance()
9: debit(cost)10: addMachine(Machine)
Specification level collaboration for usecase 2:
/UserDisplay :Display
:MachineClass
Machine
/CompanyAccount :CashAccount
/ProductionFactory : Factory
1...*
1...*
1...* 1...*
Instance level collaboration for usecase 3:
Instance level collaboration for usecase 4:
disp :Display
details : CompanyDetails
factory :Factory
sales :Sales
cash : CashAccount
:MachineClass
:Loan
1: doMonthlyAccounts()
2: o_h = machineOverhead() 6: amount := grossProfit()7: adjustBank()8: credit(new Profit())
4: adjustDuration()5: repayment := showRepayment()
3: o_h := moverhead()
Specification level collaboration for usecase 4:
/UserDisplay :Display
/CompanyDetails :CompanyDetails
/ProductionFactory : Factory
/CompanyAccount :CashAccount
:Loan
:MachineClass /SalesDetails :
Sales
Specification level collaboration diagram for usecase 5:
/UserDisplay : Display
/CompanyDetails :CompanyDetails
/CompanyAccount :CashAccount
/SalesDetails :Sales
/MarketDetails :Market
/ProductionFactory : Factory
/CompanyProduction :Production
Instance level collaboration diagram:
: Simco Cash : CashAccount
factory : Factory
Prod : ProductionRun
market : Market
sales : Sales
details : CompanyDetails
disp : Display
1: Create2: setBalance(amount)
3: Create
4: Create
8: Create
5: Create
6: Create
7: Create
Specification level collaboration diagram:-
:Simco /CompanyAccount :CashAccount
/CompanyProductionRun : ProductionRun
/ProductionFactory : Factory
/MarketDetails :Market
/SalesDetails :Sales
/CompanyDetails :CompanyDetails
/UserDisplay :Display
Instance level collaboration diagram for usecase 1:
1: RequestLoan
: User
disp :Display
: Loan details : CompanyDetails
cash : CashAccount
2: 3 : Loan ( amount,duration) 3: 5 : addLoan(Loan)
Specification level collaboration for usecase – 1:
/UserDisplay :Display
Loan
/CompanyAccount :CashAccount
/companyDetails :CompanyDetails
1...* 1...*
1...*
Instance level collaboration diagram for usecase – 2
:User
disp : Display
cash : CashAccount :Machine factory : Factory
:MachineClass
1: Purchase Machines
8: Machine7: numberOfMachines := howManyMachines()
3: cost = mCost()4: output = moutput()5: o_h : mOverhead()6: rawCost : mcrawcost()
2: Balance()
9: debit(cost)10: addMachine(Machine)
Specification level collaboration for usecase 2:
/UserDisplay :Display
:MachineClass
Machine
/CompanyAccount :CashAccount
/ProductionFactory : Factory
1...*
1...*
1...* 1...*
Instance level collaboration for usecase 3:
Instance level collaboration for usecase 4:
disp :Display
details : CompanyDetails
factory :Factory
sales :Sales
cash : CashAccount
:MachineClass
:Loan
1: doMonthlyAccounts()
2: o_h = machineOverhead() 6: amount := grossProfit()7: adjustBank()8: credit(new Profit())
4: adjustDuration()5: repayment := showRepayment()
3: o_h := moverhead()
Specification level collaboration for usecase 4:
/UserDisplay :Display
/CompanyDetails :CompanyDetails
/ProductionFactory : Factory
/CompanyAccount :CashAccount
:Loan
:MachineClass /SalesDetails :
Sales
Specification level collaboration diagram for usecase 5:
/UserDisplay : Display
/CompanyDetails :CompanyDetails
/CompanyAccount :CashAccount
/SalesDetails :Sales
/MarketDetails :Market
/ProductionFactory : Factory
/CompanyProduction :Production
Result:
Thus the UML models for the Working Company System have been developed
and verified.
EX. NO.:11 ATM SYSTEM
Aim:To create a system to perform Bank ATM transaction
Problem statement:
This system is build for the bank client and the manager. The bank client must be able to deposit and withdraw amount from his/her
accounts using the ATM machine. Each transaction must be recorded andthe client must be able to review all transactions performed in his/heraccount. Recorded transactions must include the date, time, transactiontype, amount and account balance after the transaction.
The bank manager must be able to view the ATM machine status that isthe total balance of the ATM machine, today’s withdrawal, today’sbalance and the limitations of the machine.
The bank client is provided by login verification. If it is valid he/she willaccess their account otherwise an appropriate message is displayed to theclient.
Software requirements:
Microsoft visual basic 6.0 is used as front-end for our project and ms-access isused as back-end to store the data.
USE-CASE diagram:
The ATM transaction use cases in our system are:1. Login2. Withdraw3. Mini statement4. ATM machine status5. Deposit
Actors involved:
1. User2. Bank manager
USE-CASE name: Login
The user enters a user name and password. If it is valid, the user’s accountbecomes available. If it is invalid, an appropriate message is displayed to the user.
USE-CASE name: Withdraw
The user tries to withdraw an amount from his or her checking account. Theamount is less than or equal to the checking account’s balance, the transaction isperformed and the available information is displayed. The system creates a record of thetransaction and the display confirmation message is displayed to the client.
USE-CASE name: Mini statement
The bank user requests a history of transactions for a checking account. Thesystem displays the transaction history for the checking account. The transaction historyconsists of amount, date, transaction type and balance of the particular account.
USE-CASE name: ATM machine status
The bank manager enters a username and password. If it is valid, the bankmanager accesses the machine status. If it is invalid, an appropriate message is displayedto the user.
USE-CASE name: Deposit
The bank user requests the system to deposit money to an account. The useraccesses the account for which a deposit is going to be made and enters the amount. Thesystem creates a record of the transaction and an appropriate confirmation message(display confirmation) is displayed to the client. The transaction must include the date,type, amount and account balance after the transaction.
Use-case diagram for ATM system
Class diagram
The class diagram, also referred to as object modeling is the main static analysisdiagram. The main task of object modeling is to graphically show what each object willdo in the problem domain. The problem domain describes the structure and therelationships among objects.
The ATM system class diagram consists of four classes:1. User class2. ATM machine status3. Account4. Transaction
1) User class:
It consists of four attributes and two operations. The attributes are user name,password, address and DOB. The operations of this class are read (), display () and write().
2) ATM machine status:
The attributes of this class are ATM balance, today’s withdrawal, today’s balance,and limitations. The operations are login verification (), ATM status () and displayconfirmation ().
3) Account:
The attributes are account no. and balance and the operations are withdraw (),deposit () and display availability ().
4) Transaction:
The attributes of this class are account no, transaction type, data, amount, balanceand the operations are mini statement () and create transaction ().
Class diagram for ATM system
Sequence diagram:
A sequence diagram represents the sequence and interactions of a given USE-CASE or scenario. Sequence diagrams can capture most of the information about thesystem. Most object to object interactions and operations are considered events andevents include signals, inputs, decisions, interrupts, transitions and actions to or fromusers or external devices.
An event also is considered to be any action by an object that sends information.The event line represents a message sent from one object to another, in which the “form”object is requesting an operation be performed by the “to” object. The “to” objectperforms the operation using a method that the class contains.
It is also represented by the order in which things occur and how the objects in thesystem send message to one another.
The sequence diagram for each USE-CASE that exists when a user withdraws,deposits, needs information about ATM machine status and account are drowned.
Sequence and collaboration diagram for deposit process
The diagrams show the entire deposit process in an ATM system. The user has tologin to the ATM machine and deposit the amount of money as required by the user. Theuser may wish to get a ministatement and a screen about the details of the transaction.
Sequence and collaboration diagram for login
The diagrams show the process of login by the user to the ATM system. The userhas to enter his details. The details entered are verified by the system and the user isapproved if the details match, otherwise an appropriate error message is displayed.
Sequence and collaboration diagram for checking machine status
The Administrator of the ATM system has to maintain the details about the ATM, He hasto check if there is enough money in the ATM and if the ATM is functional without
major errors. For this, he may check the ATM machine status occasionally. The processis shown in the above diagrams.
Sequence and collaboration diagram for printing ministatement
After a transaction is carried out successfully, the user must get a ministatement to tellhim his account’s details such as balance and transaction number. This process isdepicted in the above diagrams.
Sequence and collaboration diagram for withdraw process
The user can make withdraw money from his account. The process is depicted inthe diagrams above. The user has to login to the system using his username andpassword, which are verified by the system. After successful verification, the user canchoose the amount of money he wants to withdraw from his account. The amountspecified by the user is checked by the system to make sure there is enough balance in hisaccount to carry out the transaction. After the transaction is carried out the resultingamount is displayed and the details are updated to the database.
TABLES:
ACCOUNT TABLE
act_tableacctno bal111 1380888 8000
TRANSACTION TABLE
tran_tableacctno t-date t-type t-amt t-bal111 9/5/2009 wd 50 950111 9/5/2009 wd 40 910111 9/5/2009 wd 100 1010111 9/5/2009 wd 30 980111 9/5/2009 deposit 400 1380
USER TABLE
user_tableUsername password acctnoAaa bbb 111Ram 666 888
CODING:
ACCOUNT CLASS:
Option Explicit
Private acctno As String
Private bal As Integer
Public NewProperty As atm_mc
Public NewProperty2 As New transaction
Dim db As DatabaseDim rs As Recordset
Public Sub withdraw(amount As Integer)Set db = OpenDatabase("C:\Jaga\atm.mdb")Set rs = db.OpenRecordset("act_table")
rs.MoveFirstDo While Not rs.EOFIf rs(0).Value = Trim(Form1.Label1.Caption) Then
If rs(1).Value > amount Thenrs.Editrs(0).Value = Trim(Form1.Label1.Caption)rs(1).Value = rs(1).Value - amountrs.UpdateMsgBox rs(1).Value
Call NewProperty2.update_transaction(rs(0).Value, "wd", amount, rs(1).Value)Call display_availability(1)
Exit DoElse
Call display_availability(0)End If
End Ifrs.MoveNextLoop
rs.Closedb.Close
End Sub
Public Sub deposit(amount As Integer)Set db = OpenDatabase("C:\Jaga\atm.mdb")Set rs = db.OpenRecordset("act_table")
rs.MoveFirstDo While Not rs.EOFIf rs(0).Value = Trim(Form1.Label1.Caption) Then
rs.Editrs(1).Value = rs(1).Value + amount
rs.UpdateCall NewProperty2.update_transaction(rs(0).Value, "deposit", amount, rs(1).Value)Exit Do
End Ifrs.MoveNextLooprs.Closedb.Close
End Sub
Public Sub display_availability(flag As Integer)If flag = 1 ThenMsgBox "success"
ElseMsgBox "not available"
End If
End Sub
ATM CLASS:
Option Explicit
Private t_bal As Integer
Private t_with As Integer
Public NewProperty As accountDim db As DatabaseDim rs As Recordset
Public Sub login_verify(username As String, password As String)MsgBox "inside"Set db = OpenDatabase("C:\Jaga\atm.mdb")Set rs = db.OpenRecordset("user_table")rs.MoveFirstDo While Not rs.EOFIf rs(0).Value = username Then
If rs(1).Value = password ThenMsgBox rs(0).ValueForm1.Label1.Caption = rs(2).ValueForm1.Hide
Form2.ShowExit DoEnd If
End Ifrs.MoveNextLoopEnd Sub
Public Sub check_mc_status()
End Sub
Public Sub display_confirmation(flag As Integer)
End Sub
TRANSACTION CLASS:
Option Explicit
Private t_date As Variant
Private t_type As Variant
Private t_amt As Variant
Private t_bal As Variant
Public NewProperty As accountDim db As DatabaseDim rs As Recordset
Public Sub ministatement(actno As String)
End Sub
Public Sub update_transaction(actno As String, ttype As String, amount As Integer, balAs Integer)Set db = OpenDatabase("C:\Jaga\atm.mdb")Set rs = db.OpenRecordset("tran_table")'adding withdraw detail in transaction table
rs.AddNew'MsgBox Date
rs(0).Value = actnors(1).Value = Date
If ttype = "wd" Then
rs(2).Value = "wd"Elsers(2).Value = "deposit"End If
rs(3).Value = amountrs(4).Value = balrs.Update'end of updating transaction tablers.Closedb.Close
End Sub
Public Sub display()
End Sub
Private Sub logincmd_Click()
Dim log1 As atm_mcSet log1 = New atm_mcMsgBox "hi"Call log1.login_verify(Trim(Text1.Text), Trim(Text2.Text))
End Sub
Private Sub Command1_Click()Dim act As accountDim tn As transactionSet act = New accountSet tn = New transactionIf Option1.Value = True ThenMsgBox "withdraw"Call act.withdraw(Trim(Text1.Text))ElseIf Option2.Value = True ThenMsgBox "deposit"Call act.deposit(Trim(Text1.Text))ElseIf Option3.Value = True ThenMsgBox "mini"Call tn.ministatement(Form1.Label1.Caption)End IfEnd IfEnd IfEnd Sub
RESULT:Thus the system for ATM is created and executed. The output is verified.
EX. NO.: STUDENT MARK ANALYSIS SYSTEM
AIM:
To create a system to analyze the student’s marks stored in the database.
PROBLEM STATEMENT:
The purpose of this system is to analyze and perform operation on data stored inthe database and to provide authentication to avoid unauthorized access by using MS-Access as back end and VB to use as the front end. The entire system is divided intovarious modules and it has its own objects and classes.
Reports are provided on their basis:
Student marks Average Percentage
The main advantage in our system is that data entry becomes very easy and othermanipulation, updating can be done easily.
Form description:
Form1: Login Form
Here the user name and password is checked and access is granted if the verifieddata is correct.
Form2: Student Profile Form
Here the detail of each student is entered and it is stored in the database. We canalso search the details of a particular student and also make changes to the available data.
Form 3: Academic Details
Here the student name, register no, department and all the subject marks areentered and stored in the database. Finally, we are calculating the total, average andpercentage for each student.
Software requirements:
Microsoft Visual Basic 6.0 is used as front- end for our project and MS-Access isused as back-end to store the data.
USE CASE DIAGRAM:
login
Display detail
get Student personal details
studentget student marks
calculate percentage
administrator
CLASS DIAGRAM:
stud_markregno : Stringsem : Stringmark1 : Integermark2 : Integermark3 : Integer
add_mark_detail()display_mar_det()cal_percentage()
<<Class Module>>stud_per_detregno : Stringpwd : Stringname : Stringdob : datedept : Stringaddress : String
login_verify()add_per_detail()diaplay_avail()display_per_det()
<<Class Module>>
adminuname : Stringpwd : string
login_verify()
<<Class Module>>
+NewProperty
LOGIN SEQUENCE DIAGRAM
student : studentstudent : student stud_per_detail_obj :stud_per_det
stud_per_detail_obj :stud_per_det
login_verify(String, String)
diaplay_avail(Boolean)
STUDENT MARK ANALYSIS: LOGIN COLLABORATION DIAGRAM
stud_per_detail_obj :stud_per_det
student : student
2: diaplay_avail(Boolean)
1: login_verify(String, String)
Student gets access to Student personal detail to provide information.
GET STUDENTS PERSONAL DETAILS :SEQUENCE DIAGRAM
student : studentstudent : studentstud_per_det_obj :
stud_per_detstud_per_det_obj :
stud_per_det
login_verify(String, String)
diaplay_avail(Boolean)
add_per_detail( )
STUDENT MARK ANALYSIS: GET STUDENT PERSONAL DATACOLLABORATION DIAGRAM
stud_per_det_obj :stud_per_det
student : student
2: diaplay_avail(Boolean)
1: login_verify(String, String)3: add_per_detail( )
Student login is verified and their personal details are obtained.
GET STUDENTS MARK DETAILS: SEQUENCE DIAGRAM
admin :administrator
admin :administrator
stud_mark_det :stud_mark
stud_mark_det :stud_mark
add_mark_detail( )
STUDENT MARK ANALYSIS: GET STUDENT MARK DETAILSCOLLABORATION DIAGRAM
stud_mark_det :stud_mark
admin :administrator
1: add_mark_detail( )
Administrator logins to add the mark details of students.
DISPLAY :SEQUENCE DIAGRAM
student : studentstudent : student stud_per_det_obj :stud_per_det
stud_per_det_obj :stud_per_det
stud_mark :stud_mark
stud_mark :stud_mark
display_per_det( )
display_mar_det( )
STUDENT MARK ANALYSIS: DISPLAY COLLABORATION DIAGRAM
student : student
stud_per_det_obj :stud_per_det
stud_mark :stud_mark
1: display_per_det( )
2: display_mar_det( )
Students get access to display their personal details and mark details.
CALCULATE PERCENTAGE: SEQUENCE DIAGRAM
admin :administrator
admin :administrator
stud_mark_det :stud_mark
stud_mark_det :stud_mark
cal_percentage( )
STUDENT MARK ANALYSIS: PERCENTAGE CALCULATIONCOLLABORATION DIAGRAM
admin :administrator
stud_mark_det :stud_mark
1: cal_percentage( )
Administrator calculates the percentage of student marks.
Table requirement:
There are two tables required. They are:
Student profile table:
In this table, we get the details of the students like name, father’s name, date ofbirth, age, regulation, hobbies, e-mail id, address, blood group and contact number. It alsohas fields to search a particular student details, academic details and to modify theexisting data.
Academic table:In this table, we get the name, register no, department, marks for each subject,
total and average. It also has fields to search, add, update and to calculate the percentage.
DATABASE TABLES:
Adminad_name ad_pwdadm Adm
stud_marka_regno s_sem s_mark1 s_mark2 s_mark3 s_per222 1 80 90 90 87
stud_pers_regno s_pwd s_name s_dob s_dept s_address111 aaa arunraj 2/2/1997 CSE Text4222 bbb abilasha 10/13/1987 ECE kkdi333 ccc uma 12/10/1980 EEE kkd
FORM 1 DESIGN:
FORM 1 CODING:
Private Sub Command1_Click()Dim s As stud_per_detDim ad As admin
If Option1.Value = True ThenSet s = New stud_per_detCall s.login_verify(Trim(Text1.Text), Trim(Text2.Text))
ElseIf Option2.Value = True ThenSet ad = New adminCall ad.login_verify(Trim(Text1.Text), Trim(Text2.Text))End If
End If
End Sub
FORM2 DESIGN:
FORM 2 CODING:
Dim s_per As stud_per_det
Private Sub Command1_Click()Set s_per = New stud_per_det
Call s_per.add_per_detail(Text1.Text, Text2.Text, Combo1.Text, Text4.Text)
End Sub
Private Sub Command2_Click()Set s_per = New stud_per_detCall s_per.display_per_det
End Sub
Private Sub Command3_Click()Form2.HideForm3.ShowForm3.Command1.Visible = FalseForm3.Command2.Visible = FalseForm3.Text1.Text = Form2.Text3.Text
End Sub
Private Sub Command4_Click()Form2.HideForm1.Show
End Sub
Private Sub Command5_Click()EndEnd Sub
Private Sub Form_Load()Text3.Text = Form1.Text1.Text
End Sub
FORM3 DESIGN:
FORM 3 CODING:
Dim s_mark As stud_mark
Private Sub Command1_Click()Set s_mark = New stud_mark
Call s_mark.add_mark_detail(Trim(Text1.Text), Combo1.Text, Int(Trim(Text2.Text)),Int(Trim(Text3.Text)), Int(Trim(Text4.Text)))
End Sub
Private Sub Command2_Click()Set s_mark = New stud_markCall s_mark.cal_percentage(Trim(Text1.Text), Combo1.Text)End Sub
Private Sub Command3_Click()Set s_mark = New stud_markCall s_mark.display_mar_det(Trim(Text1.Text), Combo1.Text)End Sub
Private Sub Command4_Click()Form3.HideForm1.Show
End Sub
Private Sub Command5_Click()EndEnd Sub
ADMIN CLASS MODULE:
Option Explicit
'##ModelId=4AB45CA30389Private uname As String
'##ModelId=4AB45CA801D4Private pwd As StringDim db As DatabaseDim rs As Recordset
'##ModelId=4AB45CD702A5Public Sub login_verify(aname As String, apwd As String)Set db = OpenDatabase("C:\Documents and Settings\cse1\Desktop\vino\studdb.mdb")Set rs = db.OpenRecordset("admin")rs.MoveFirstDim flag As Booleanflag = FalseDo While Not rs.EOFIf Trim(rs(0).Value) = aname Then
If Trim(rs(1).Value) = apwd ThenForm3.ShowForm3.Command1.Visible = True
Form3.Command2.Visible = True
Form1.Hide
Exit DoEnd If
End Ifrs.MoveNext
Loop
rs.Closedb.CloseEnd Sub
STUDENT PERSONAL DETAIL CLASS MODULE:
Option Explicit
'##ModelId=4AB1F3320269Private regno As String
'##ModelId=4AB1F33A0375Private pwd As String
'##ModelId=4AB1F33F01FEPrivate name As String
'##ModelId=4AB1F3450065Private dob As Date
'##ModelId=4AB1F34C02C5Private dept As String
'##ModelId=4AB1F34E033BPrivate address As String
'##ModelId=4AB1F3D20371Public NewProperty As stud_markDim db As DatabaseDim rs As Recordset
'##ModelId=4AB1F36F0067Public Sub login_verify(regno As String, pwd As String)Set db = OpenDatabase("C:\Documents and Settings\cse1\Desktop\vino\studdb.mdb")Set rs = db.OpenRecordset("stud_per")
rs.MoveFirstDim flag As Booleanflag = FalseDo While Not rs.EOFIf Trim(rs(0).Value) = regno Then
If Trim(rs(1).Value) = pwd Thenflag = True
Exit DoEnd If
End Ifrs.MoveNext
Loop
Call display_avail(flag)
rs.Closedb.CloseEnd Sub
'##ModelId=4AB1F3780097Public Sub add_per_detail(sname As String, sdate As String, sdept As String, sadd AsString)Set db = OpenDatabase("C:\Documents and Settings\cse1\Desktop\vino\studdb.mdb")Set rs = db.OpenRecordset("stud_per")rs.MoveFirstDo While Not rs.EOFIf Trim(rs(0).Value) = Trim(Form2.Text3.Text) Then
rs.Editrs(2).Value = snamers(3).Value = sdaters(4).Value = sdeptrs(5).Value = saddrs.UpdateMsgBox "det added"Exit DoEnd Ifrs.MoveNextLooprs.Closedb.CloseEnd Sub
'##ModelId=4AB1F4760303
Public Sub display_avail(flag As Boolean)If flag = True Then
MsgBox "valid student"Form1.HideForm2.Show
ElseMsgBox "invalid login"End If
End Sub
'##ModelId=4AB1F724028BPublic Sub display_per_det()Set db = OpenDatabase("C:\Documents and Settings\cse1\Desktop\vino\studdb.mdb")Set rs = db.OpenRecordset("stud_per")rs.MoveFirstDo While Not rs.EOFIf Trim(rs(0).Value) = Trim(Form2.Text3.Text) ThenForm2.Text1.Text = rs(2).ValueForm2.Text2.Text = rs(3).ValueForm2.Combo1.Text = rs(4).ValueForm2.Text4.Text = rs(5).ValueExit DoEnd Ifrs.MoveNextLooprs.Closedb.Close
End Sub
STUDENT MARK DETAIL CLASS MODULE:
Option Explicit
'##ModelId=4AB1F358025BPrivate regno As String
'##ModelId=4AB1F35B00A1Private sem As String
'##ModelId=4AB1F363004APrivate mark1 As Integer
'##ModelId=4AB1F36600BFPrivate mark2 As Integer
'##ModelId=4AB1F3680146Private mark3 As IntegerDim db As DatabaseDim rs As Recordset'##ModelId=4AB1F3890359Public Sub add_mark_detail(sregno As String, ssem As String, sm1 As Integer, sm2 AsInteger, sm3 As Integer)Set db = OpenDatabase("C:\Documents and Settings\cse1\Desktop\vino\studdb.mdb")Set rs = db.OpenRecordset("stud_mark")MsgBox "inside"rs.AddNewrs(0).Value = sregnors(1).Value = ssemrs(2).Value = sm1rs(3).Value = sm2rs(4).Value = sm3rs(5).Value = 0rs.UpdateMsgBox "added"
End Sub
'##ModelId=4AB1F3B000B6Public Sub display_mar_det(sregno As String, ssem As String)Set db = OpenDatabase("C:\Documents and Settings\cse1\Desktop\vino\studdb.mdb")Set rs = db.OpenRecordset("stud_mark")rs.MoveFirstDo While Not rs.EOFIf rs(0).Value = sregno Then
If rs(1).Value = ssem ThenForm3.Text2.Text = rs(2).ValueForm3.Text3.Text = rs(3).ValueForm3.Text4.Text = rs(4).ValueForm3.Text5.Text = rs(5).ValueExit Do
End IfEnd Ifrs.MoveNextLoopEnd Sub
'##ModelId=4AB1F3B701D3Public Sub cal_percentage(sregno As String, ssem As String)Set db = OpenDatabase("C:\Documents and Settings\cse1\Desktop\vino\studdb.mdb")Set rs = db.OpenRecordset("stud_mark")
rs.MoveFirstDo While Not rs.EOFIf rs(0).Value = sregno Then
If rs(1).Value = ssem Thenrs.Edit
rs(5).Value = (rs(2).Value + rs(3).Value + rs(4).Value) / 3
Form3.Text5.Text = rs(5).Valuers.Update
Exit DoEnd If
End Ifrs.MoveNextLooprs.Closedb.Close
End Sub
RESULT:Thus the system for Student mark analysis is created and executed. The output is
verified.
Ex. NO.: Employee Payroll system
Aim
To create a computer system to process employee’s payroll.
Problem statement
This system is built for employee and manager. The employee can view his salary and the manager can add a new employee,
update employee details and calculate and credit the salary. The employee and manager can log into the system providing their respective user
names at login, if the entered input is incorrect an appropriate message isdisplayed.
System requirements
Microsoft visual basic 6.0 is used as front-end for our project and ms-access asour back-end.
Use-case diagram
The payroll use cases in our system are:1 .Login2. Add employee3. Update employee details4. Delete employee5. Calculate salary6. View employee details7. Logout
Actors involved
1. Manager2. Employee
Use-case name: Login
The user enters the username and password and chooses if the user is employee oradministrator. If entered details are valid, the user’s account becomes available.If it is invalid, an appropriate message is displayed to the user.
Use-case name: Add employee
Only the manager has access to this use-case. The manager has to provide thedetails of the employee to create an account for a new employee. If the employee addedalready exits an appropriate message is displayed.
Use-case name: Update employee details
This use-case can be accessed only by the manager and not by the employee. Thedesired employee is searched for and the details of the employee are updated with newentries. If the employee searched for is not available an appropriate message is displayed.
Use-case name: Delete employee
This use-case can also be used only by the manager. It is used to delete the recordof an employee if it is not necessary. The employee identity is provided by the managerwhich is searched for and if it is found, it is deleted. If it is not found an appropriatemessage is displayed.
Use-case: calculate salary
This use-case is used to calculate the salary of the employee after addingallowances and deducting as necessary. The net salary is displayed. This use-case can beused by both employee and by the administrator. The employee details are searched forand the net salary is calculated.
Use-case: View employee details
This use-case is used to display details of the employee. If the employee searchedfor is not available, an appropriate message is displayed.
Use-case: logout
After all the necessary operations are complete, this use-case is used to logout ofthe current account.
Use-case diagram for payroll system
Class diagram
The class diagram is a graphical representation of all the classes used in thesystem and their operations, attributes and relationships.
The payroll system makes use of the following classes:1. System2. Employee details3. Employee salary
1) System
It consists of two attributes and two operations. The attributes areusername and password. The operations used are login () and logout ().
2) Employee details
It is used to store the personal details of the employee, such as name,employee id, gender and age. The operations available in this class areview(), add employee(), edit employee details(), view employee details(),delete employee details().
3) Employee salary
It is used to store the salary details of the employee such as basic pay,house rent allowance, dearness allowance, provident fund and insuranece.The operations available are calculate net salary(), view salary details(),update salary details() and deduce fine().
Class diagram for payroll system
Sequence diagram
A sequence diagram represents the sequence and interactions of a given use-caseor scenario. Sequence diagrams can capture most of the information about the system.Most object-to-object interactions and operations are considered events and eventsinclude signals, inputs, decisions, interrupts, transitions and actions to or from users orexternal devices.
An event also is considered to be any action by an object that sends information.The event line represents a message from one object to another, in which the “from”object is requesting an operation be performed by the “to” object. The “to” objectperforms the operation using a method that the class contains.
It is also represented by the order in which things occur and how the objects in thesystem send message to one another.
The sequence diagram for each use-case that exists when a user logs in, adds,views, updates or deletes records in the system.
Sequence diagram and collaboration for adding an employee
For the use case of adding an employee, a sequence and an interaction diagram aredrawn. The diagrams show that administrator can only add a new employee.
Sequence and collaboration diagram for calculating the net salary
The net salary is calculated by adding the salary details such as basic hra, da, etc., anddeducing the insurance and pf amount.
Sequence and collaboration diagram for deleting an employee
Only the administrator has privilege to delete an employee. The employee record whichhas to be deleted is selected by the administrator and deleted.
Sequence and collaboration diagram for editing an employee’s details
Only the administrator has the privilege to edit employee details. The employee detailsare selected and edited by the administrator and saved to the database.
Sequence and collaboration diagram for viewing employee salary
The employee may wish to view his salary details. An employee may see only his ownsalary details and not that of anyone else.
RESULT:Thus the documentation for employee payroll system is created. The output is
verified.
Ex. NO.: AIRLINE TICKET RESERVATION SYSTEM
Introduction:
The manual system of ticket reservation takes more time and the number ofreservations per day is limited. To increase the efficiency of the process, we go for onlineticket reservation system. This system supports online ticket booking.
Problem statement
This system is built for user to directly access the system online to book tickets.The user can book, print, delete tickets without the help of a clerk. The administrator hascontrol over the adding flights available for booking and has control over deleting flightsthat are not necessary. The administrator and user can both enter the system using theirrespective login details
System requirements
Microsoft visual basic 6.0 is used as the front-end for our project and ms-access isused as the back-end.
Use-case diagram
The online ticket reservation system uses the following use cases:1. Login2. Book ticket3. Print ticket4. Cancel ticket5. View flight6. Add flight7. Delete flight8. Logout
Actors involved1) Administrator2) Passenger
Use-case name: login
The user enters a username and a password. And if the entered details are valid,the user’s details are brought to the screen; if they are invalid then an appropriatemessage is displayed.
Use-case name: Book ticket
The user is allowed to book a ticket on the flight he requires and the date and timeas is necessary for the user. The user has to provide details such as name, flight number,date of travel, departure time, and can view the price of the ticket.Use-case name: Print ticket
The user after booking a ticket can print a copy of the ticket reserved. The userhas to provide the details about ticket number for searching in the database and passengername for confirming passenger identity.
Use-case name: Cancel ticket
A passenger can decide to cancel a ticket after the ticket is booked. The passengerhas to provide details about ticket for searching and details about him for confirmation ofidentity.
Use-case name: View flight
The passenger can view the flights available in the database for deciding whichflight’s ticket he wishes to book. The passenger can view the details of flights such as,flight number, Flight Company, price, departure and arrival times.
Use-case name: Add flight
Only the administrator has privilege to add flights. The administrator can add theflight on which tickets can be booked by the passengers. The administrator has to providedetails about a new flight such as flight number, flight company name, price, departuretime, date of travel.
Use-case name: Delete flight
The administrator also has the privilege to delete flights that are not necessary.The administrator has to provide details about the flight for searching and inform anypassengers that have booked tickets on the flight about the change and make necessaryarrangements.
Use-case name: Logout
After the necessary operations have been performed on the system, the user canchoose to logout from the system.
Use-case diagram for airline reservation
Class diagram
The class diagram is a graphical representation of all the classes used in thesystem and their operations, attributes and relationships.
The online ticket reservation system makes use of the following classes:
o Ticket systemo Flight detailso Ticket
Ticket system
It consists of two attributes and two operations. The attributes are username andpassword. The operations used are login () and logout ().
Flight details
It stores the details of all the flights such as flight number, Flight Company, flightcapacity, and cost. The operations available are add (), delete () and view ().
TicketIt records the details of every ticket booked such as ticket number, passenger
name, and flight number, from place, to place, date of travel, departure time, arrival time,and price. The operations available are add (), delete (), view (), and print ().
Class diagram for airline reservation system
Sequence diagramA sequence diagram represents the sequence and interactions of a given use-case
or scenario. Sequence diagrams can capture most of the information about the system.Most object-to-object interactions and operations are considered events and events
include signals, inputs, decisions, interrupts, transitions and actions to or from users orexternal devices.
An event also is considered to be any action by an object that sends information.The event line represents a message from one object to another, in which the “from”object is requesting an operation be performed by the “to” object. The “to” objectperforms the operation using a method that the class contains.
It is also represented by the order in which things occur and how the objects in thesystem send message to one another.
The sequence diagram for each use-case that exists when a user logs in, adds,views, updates or deletes records in the system.
Sequence and collaboration diagram for adding a flight
The Administrator has the privilege to add flight. He has to provide details aboutthe new flight that is being created in the database.
Sequence and collaboration diagram for booking a ticket
A passenger can book a ticket by himself. He can view the flight details he wantsto book a ticket on and as per his necessity may book an appropriate ticket.
Sequence and collaboration diagram for canceling a ticket
Canceling a ticket can be performed by the passenger himself. He may view theticket he wants and cancel it.
Sequence and collaboration diagram for deleting a flight
A flight can be deleted only by the administrator. The flight to be deleted is selected andremoved from the database.
Sequence and collaboration diagram for printing a ticket
The passenger may choose to print a ticket after booking a ticket. The ticket which isbooked is selected and printed by the passenger.
RESULT:Thus the documentation for airline reservation system is created. The output is
verified.
Ex. NO.: Course Registration System
Aim
To create a system through which students can register to the courses desired bythem.
Problem statement
The system is built to be used by students and managed by an administrator. The student and employee have to login to the system before any processing can
be done. The student can see the courses available to him and register to the course he
wants. The administrator can maintain the course details and view all the students who
have registered to any course.
System requirements
Microsoft visual basic 6.0 is used as the front end of our project and ms-access asthe back end.
Use-case diagram
The course registration system has the following use-casesLoginView course detailsRegistrationDisplay detailsMaintain course detailsLogout
The actors involved in the system are
1. Student2. Administrator
Use-case name: Login
The user enters the username and password and chooses if the user is student oradministrator. If entered details are valid, the user’s account becomes available.If it is invalid, an appropriate message is displayed to the user.
Use-case name: View course details
In this use case, a student can search all the courses available to him and choosethe best course he wants. The student can view the course duration, faculty anddepartment of the courses he may choose.Use-case name: Registration
When a student has successfully chosen a course, he can register to that course.Upon registration, the student’s details are stored in the database.
Use-case name: Display details
After registration to any course, the student may see the details of his currentcourse. He may wish to know details about fees and other information. The administratoralso has the privilege to display details of the the students and the corresponding coursefor which they have registered.
Use-case name: Maintain course details
The administrator has to perform the duties of maintaining the course details. Anychange to the course structure is maintained by the administrator.
Use-case name: Logout
After all the desired transactions are made, the user may choose to logout fromthe system to save all he changes they have made.
Use-case diagram for course registration system
Class diagram
The class diagram is a graphical representation of all the classes used in thesystem and their operations, attributes and relationships.
The course registration system makes use of the following classes:
1. Stud(student details)2. Administrator
1) Stud
It consists of the details of all the students present in the database. Theattributes present in this class are student id, password, name, age, sex, course andattendance. The object of this class is created as soon as the student registers to acourse. The operations available to this class are login (), logout (), confirmation(), register (), and view course details ().
2) Administrator
It consists of details of all the courses available to the student. Theattributes present in this class are username, password, course fees, fees due,marks, and attendance. The operations available to this class are login (), logout(), ma course details (), display course (), and confirmation ().
Class diagram for course registration system
Sequence diagram
A sequence diagram represents the sequence and interactions of a given use-caseor scenario. Sequence diagrams can capture most of the information about the system.Most object-to-object interactions and operations are considered events and eventsinclude signals, inputs, decisions, interrupts, transitions and actions to or from users orexternal devices.
An event also is considered to be any action by an object that sends information.The event line represents a message from one object to another, in which the “from”object is requesting an operation be performed by the “to” object. The “to” objectperforms the operation using a method that the class contains.
It is also represented by the order in which things occur and how the objects in thesystem send message to one another.
The sequence diagram for each use-case that exists when a user logs in, adds,views, updates or deletes records in the system.
Sequence and collaboration diagram for login to the system
Users have to first login to the system before performing any operation. The userhas to provide the necessary details to the system for login.
Sequnce and collabaration diagram for logout
When the necessary operations have been performed on the system, the user maychoose to save the changes and logout from the system.
Sequence and collabaration diagram for registration to a course
After login, the student has to register to a course of his choice. The studentcan view all the courses available to him and register to a course suitable to him. Thestudent may view the course details before registration.
Sequence and collaboration diagram for viewing course details
A student may wish to view course details before registration. For this, the studenthas to first login and select the course details he wishes to see.
Sequence and collaboration diagram for maintaining course details
Course details may be changed as per the requirement every year. So theadministrator can edit the details of the course as necessary.
RESULT:Thus the documentation for course registration system is created. The output is
verified.