Jump to content
Come try out the Arcade, Link at the top of the website ×

Recommended Posts


  • Member ID:  677
  • Group:  ***- Inactive Clan Members
  • Followers:  18
  • Topic Count:  172
  • Topics Per Day:  0.03
  • Content Count:  1457
  • Content Per Day:  0.26
  • Reputation:   791
  • Achievement Points:  9890
  • Solved Content:  0
  • Days Won:  5
  • Joined:  11/02/09
  • Status:  Offline
  • Last Seen:  
  • Birthday:  02/20/1986

Posted (edited)

So I got an assignment for my java class that I am having a bit of trouble with. I pasted it below this paragraph. I do not need any programming help just some explanation. i havent been able to get ahold of the instructor. What is a command line program?

 

1. Create a software design for a basic vending machine. What are the functional components of the user interface? What are the possible states of the vending machine, and what are the transitions between those states? What are the functions of the vending machine? Create and submit written descriptions, flow charts, state diagrams, etc., as necessary to document your design. We're interested only in the functional design, not the visual/physical design.

 

2. Write Java code implementing the virtual vending machine you designed. Demonstrate your understanding of object-oriented design and good coding practices.

 

3. Write a command-line test program that allows a user to test your vending machine. The user

should be able to see a list of snacks/prices, select a snack, put money into the machine, receive

money back, etc.

Edited by fireurza


  • Member ID:  989
  • Group:  *** Clan Members
  • Followers:  25
  • Topic Count:  290
  • Topics Per Day:  0.05
  • Content Count:  20545
  • Content Per Day:  3.66
  • Reputation:   22526
  • Achievement Points:  148254
  • Solved Content:  0
  • Days Won:  395
  • Joined:  01/07/10
  • Status:  Offline
  • Last Seen:  
  • Birthday:  01/27/1946
  • Device:  Windows

Posted

A program where you are passing strings to the main method from the command line - essentially taking in arguments. When you launch a program from the command line you can specify arguments after the program name. The program can access these strings by processing the args parameter in the main method.



  • Member ID:  389
  • Group:  *** Clan Members
  • Followers:  48
  • Topic Count:  319
  • Topics Per Day:  0.06
  • Content Count:  4910
  • Content Per Day:  0.86
  • Reputation:   4099
  • Achievement Points:  39693
  • Solved Content:  0
  • Days Won:  52
  • Joined:  09/14/09
  • Status:  Offline
  • Last Seen:  
  • Birthday:  01/01/1970
  • Device:  Windows

Posted (edited)
we're  interested only in software / not hardware

 

 

sounds wants  a working  sample of  accounting software for vending machine via canbus

 

 

Fireurza   do we get the mark too  lol

Edited by KaptCrunch


  • Member ID:  677
  • Group:  ***- Inactive Clan Members
  • Followers:  18
  • Topic Count:  172
  • Topics Per Day:  0.03
  • Content Count:  1457
  • Content Per Day:  0.26
  • Reputation:   791
  • Achievement Points:  9890
  • Solved Content:  0
  • Days Won:  5
  • Joined:  11/02/09
  • Status:  Offline
  • Last Seen:  
  • Birthday:  02/20/1986

Posted

kinda figure most of it out now... essential step 2 and 3 are the same step 3 just states it a bit more in detail....though one thing i never learned in class... what is a state machine diagram?



  • Member ID:  561
  • Group:  ++++ Senior Admin
  • Followers:  85
  • Topic Count:  502
  • Topics Per Day:  0.09
  • Content Count:  5336
  • Content Per Day:  0.94
  • Reputation:   4612
  • Achievement Points:  41356
  • Solved Content:  0
  • Days Won:  29
  • Joined:  10/14/09
  • Status:  Offline
  • Last Seen:  
  • Birthday:  04/06/1992
  • Device:  Windows

Posted

As far as command line interface I would imagine he is talking about a console application, not necessarily taking arguments from the startup params.  

 

5326b99824d8e_1.png

 

5326b9e986bbc_3.png

 

5326b9ab75080_2.png

 

 

State machine diagrams essentially show the different states and which states can transition to other states. You can use something like WhiteStar UML to draw them.

 

For a vending machine you can have the following as the main states:

 

5326b71f599af_statemain.jpg

 

The four states are Off, Idling, Processing Request and Maintenance Mode. Essentially Idling is waiting for a product selection to be made - once made it would change state to processing request. The Idling state splits into a substate and could look something like this:

 

5326b7d680a5e_stateidling.jpg

 

Just like how the Idling splits down to a substate the processing and maintenance would as well. You can have as many layers of states as you want depending on the complexity of the system. Here is processing request for a 'smart' vending machine that would accept different payment types:

 

5326b8b051aba_stateprocessing.jpg

 

 

Any questions?

 

duc



  • Member ID:  677
  • Group:  ***- Inactive Clan Members
  • Followers:  18
  • Topic Count:  172
  • Topics Per Day:  0.03
  • Content Count:  1457
  • Content Per Day:  0.26
  • Reputation:   791
  • Achievement Points:  9890
  • Solved Content:  0
  • Days Won:  5
  • Joined:  11/02/09
  • Status:  Offline
  • Last Seen:  
  • Birthday:  02/20/1986

Posted

thats what i was thinking duck... ty.... gonna finish working on it tonight


Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.