srihari_vasista_UML Diagrams-Q1-Q2_HW2

srihari_vasista_UML Diagrams-Q1-Q2_HW2 -...

Info icon This preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Srihari J Vasista A20249633 1. Class Diagram for an webm 0. 1 1 0... 1 1 Add Attachments Emails Store Emails Inherita mailsystem. 0...* 0…* 1 1 1 s ance Access emails through mailbox All user one ma system 1 rs in ail m
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2. Class Diagram – Vending Machine Actors – Vending Machine, Money Handler, Money, Drink, Stock, Mail Handler Attributes: Machine (Location, Model Number), Vending Stock (Cans, Count) Drink(Name, Brand, Price, Type) 2A: CLASS DIAGRAM :- Validates Handles Inspects Checks Mail 0..* 0..* 1 1 0..* 1 1 1 1..* 1 Money Handler +identifyMoney():string +addAmountt():int +returnAmt():int +checkAmt():int +reduceAmount():int Vending machine -Location: string -Model Number: int +returnChange():int +addMoney():int +dispenseDrink():dispense +displayTotal():int +chooseDrink():string +isavailable():boolean
Image of page 2
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: +validateMoney():boolean Drinks -Brand: string -Type: string -Name: string +getBrand(): string +getType(): string +getNumber(): int Stock -Cans : int -Count : int +getType():string +getNumber():int +getBrand():string +getStock():int Email Handler -emailSupplier():email Money +getValue(): int 2B: SEQUENCE DIAGRAM :- chooseDrink() returnChange() validateMon ey() emailSupp lier() getStock() dispense() addAmt() reduceAmt() getBrand() dispenseDrink() Isavailable() getValue() checkAmt() Vending Machine Money Handler Money Stock Drink Email System 2C - STATE TRANSITION DIAGRAM :- Power On Less stock Enough Stock Rest Money Out of stock Cancel Fake Idle Enough Money Cancel Money input Idle Display Amount Return Money Ready to Dispense Stock Email System Email Supplier Power Off...
View Full Document

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern