Msc the Vending Machine

Topics: Class, Class diagram, Data type Pages: 2 (462 words) Published: November 8, 2010
The Vending Machine
This program is intended to set up and then simulate control of the functions of a vending machine.

1)A class Diagram to represent the associations between classes. You can use Visio, MS Word or manual drawing to produce the Class Diagram.

2)A brief description of how Program Development fits into the system development life CYCLE First of all, I designed the needed class definitions and design my objects. Then I decided the interactions between my class models. The other important part is this. In this part, I choose the connection ad communication cycles between my class model., I mean which class “uses” another class or reference another class, or helping other class with its capabilities. My main basic functional data types are Product and VendingProduct classes. These are basic classes used by others. The start of the program is the Driver class which included Main method. Then ProductOperationModule is used as a bridge , making operations of main and calling and generating data and object array. And this class also calls the GUI at the end. 3)A brief description of how the JPanel and JButton Classes are implemented in your program For screen design I used BorderLayout and GridLayout, seeing the frame like grids. I need two separate part in the screen, one is for texbox for total, payment, replenish and exit buttons ; and the other part is for Product buttons in vending machine. So in JFrame, I defined two JPanel for them. for total, payment, replenish and exit buttons is one panel, and buttons are in other panel. this.setLayout(new BorderLayout());

this.add(p1, BorderLayout.NORTH);
this.add(p2, BorderLayout.CENTER);
As seen above, p1 and p2 panels are designed with p1 is north means upper of the frame, and p2 is center means below of it. For product buttons;
JButton btn[] = new JButton[10];
Designed array of JButtons,
for (int i = 0; i < btn.length; i++) {
btn[i] = new JButton();...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Vending Machines Essay
  • Coca Cola Vending Machines Essay
  • Vending Machines in Schools Essay
  • Milk Vending Machine Essay
  • Essay about Automated Chocolate Vending Machine
  • Essay about vending machine
  • Vending Machine Essay
  • Vending Machines Essay

Become a StudyMode Member

Sign Up - It's Free