3 Replies - 2483 Views - Last Post: 14 September 2013 - 01:53 PM Rate Topic: -----

#1 New-CompS.Student   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 14-September 13

How to create a Vending Machine program?

Posted 14 September 2013 - 01:16 PM

I am having trouble creating an UML Diagram before I start creating the code. what are some of the attributes of a vending machine? What are the constructers?
Is This A Good Question/Topic? 0
  • +

Replies To: How to create a Vending Machine program?

#2 andrewsw   User is offline

  • no more Mr Potato Head
  • member icon

Reputation: 6957
  • View blog
  • Posts: 28,696
  • Joined: 12-December 12

Re: How to create a Vending Machine program?

Posted 14 September 2013 - 01:20 PM

What efforts have you made so far? What have you come up with?
Was This Post Helpful? 0
  • +
  • -

#3 New-CompS.Student   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 14-September 13

Re: How to create a Vending Machine program?

Posted 14 September 2013 - 01:26 PM

View Postandrewsw, on 14 September 2013 - 01:20 PM, said:

What efforts have you made so far? What have you come up with?


For the attributes I came up with:
- Beverage
- Cost
- Calories


For the constructors I came up with:

+ Beverage Type
Was This Post Helpful? 0
  • +
  • -

#4 farrell2k   User is offline

  • D.I.C Lover
  • member icon

Reputation: 874
  • View blog
  • Posts: 2,706
  • Joined: 29-July 11

Re: How to create a Vending Machine program?

Posted 14 September 2013 - 01:53 PM

Depends on how far you want to take it, but look at a few vending machines. What do they have in common? Some fields like coin slot, change return, display window, button selection display, a list of items.

behaviors might be accept money, return change, make selection, process selection, deliver selection.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1