COM616_Assignment_1_2013-14

download COM616_Assignment_1_2013-14

of 5

Transcript of COM616_Assignment_1_2013-14

  • 8/13/2019 COM616_Assignment_1_2013-14

    1/5

    Institute of Arts, Science and TechnologyDepartment of Computing

    LEVEL: 6

    !D"LE: C!6#6 $ %indo&s ' %e( (ased ApplicationDe)elopment

    ASSI*+E+T: !+E

    ISS"E DATE: % #-th!ct ./#0

    S"ISSI!+ DEADLI+E: #01// $ Tuesday .6th+o)em(er ./#0

    LECT"2E2: 31 %orden VE2I4IED 5: V1 *rout

    To be completed by student

    +ame: 3uan enacho asalo Date su(mitted: .6##./#0

    Course: Applied Computing Student Signature:

    Certification: I certify that the whole of this work is the result of my individual effort

    and that all quotations from books, periodicals etc. have been acknowledged.

    To be completed by lecturer

    Comments:

    *radear7 88

    88+ote: Please note that the above shown feedback is indicative and that scores may change whenmoderated.

    1

  • 8/13/2019 COM616_Assignment_1_2013-14

    2/5

    Tas7:

    1. In order to demonstrate your understanding of Object Oriented rogramming withina visual environment you are required to create an object oriented graphicalprogram to simulate a drinks vending machine.

    !. "rom your own investigation into the #nified $odelling %anguage $%', designthe machine using objects. (hat are the components, what are theirresponsibilities, how do they work together) roduce the necessary user case,sequence and class diagrams to model your solution.

    *. +evise a suitable test plan to test the correctness of the program you havedesigned. reate a test log indicating the test runs you have carried out on theprogram, with sample data, e-pected and actual results. If the program containsmore errors that you have been able to solve, document the problem and describewhat you have done to try and resolve it.

    *uidance:

    #se suitable containers to store the products within the vending machine.

    The vending machine accepts money and distributes various drinkproducts. It has the following criteria

    The vending machine has a cash slot that accepts /p, 10p,

    !0p, /0p, 1 and ! coins. It also has a cancel button, whichreturns any money inserted.

    There is no requirement to reject counterfeit coins. 2ssume

    that no counterfeit coins are entered.

    The vending machine has a front panel that associates

    product names3descriptions, prices for the products. Itaccepts choices for a product and causes vending of theproduct provided sufficient money has been inserted.

    The vending machine has si- vend slots that contain the

    products. 4ach has a fi-ed capacity of five products5

    The vending machine has a change maker that gives back

    correct change in /p, 10p, !0p, /0p, 1 and ! coins. It always gives back theminimum number of coins from among those it currently has available. If the

    change maker cannot guarantee to give back change for a purchase it goes into6correct money only mode6 in which it requires e-act change from a customer.

    The vending machine has a cash bo- that holds /p, 10p, !0p, /0p, 1 and !

    coins.

    The ma-imum capacity of the ash 7o- is twenty of each coin type. If it doesn8t

    have enough change, or it doesn9t ha)e enough room for the money (eingadded, or the user has given less than product price then the sale is rejected.

    If the refund button is pressed after money is supplied and before a product is fully

    selected, return the inserted funds using the fewest number of coins possible.

    2n out of stock product cannot be dispensed.

    9ust prior to the machine being shut down for cleaning and restocking it will displayan onscreen report showing the quantities sold and total funds raised for eachproduct line and for the machine.

    2

  • 8/13/2019 COM616_Assignment_1_2013-14

    3/5

    The vending machine accepts commands from a customer. In a real vending

    machine these would be connected to physical devices. In this simulation you willneed a simple front end &(indows "orm'. "eel free to design and build a moreelaborate one.

    The initial data is provided in the following table

    Drink Name Price Per Can

    oke 0./0epsi 0./0Tango 0.:/;#p 0.;/%ilt 0.:0otice that the machine can hold si- drinks with a ma-imum of five cans per drink.

    4ach time the program runs, it will restock the machine to capacity5

    display the drinks and their prices5

    Initialise the cashbo- with 10 coins of each denomination.

    This assignment focusses on OO design and implementation. ?our grade will bedetermined by how well you utilise you own classes together with a (indows "orm for thefront panel. @tart by working on a good design, models, structure, etc. ?our Aending$achine program &illcontain at least the four following classes but there may be more

    4rontanel &(indows "orm' B aptures selection5 Cnows price of selection, 2sks

    ash 7o- if enough money has been put in5 Instructs the Aending rocessor todispense product

    VendingrocessorD Cnows how to dispense and manage products.

    roduct

    Casho; B Cnows amount of money put in5 Eives change

    ass criteria:

    ?our vending machine should B

    ontain at least the four required classes

    reate and initialise the Aending rocessor with products

    The "ront anel should display product name F price based on data supplied by

    the Aending rocessor

    2ccept coins and dispense products on sufficient submitted funds

    +isplay total change after dispensing the product or after cancelling the

    transaction.

  • 8/13/2019 COM616_Assignment_1_2013-14

    4/5

    2 standard machine as described in the full specification and an advanced vendingmachine which inherits the functionality of the standard machine but includes additionalfunctionality to accept payments with either a / or 10 note.

    There is scope for various other improvements and enhancements to model a realvending machine but it is left to you to consider this and respond accordingly. "or

    e-ample, it is more realistic to hold a larger product range and more products of each line.(hen restocking, you would not normally remove all of the items in the machine. ?ouwould just add sufficient items to fill each product line. 4nsure that you highlight anyenhancements implemented. Gowever, do not spend a disproportionate amount of timepursuing this issue.

    4urther guidance:

    ?ou should work individually on this assignmentIt is an unrealistic assumption to e-pect a user to enter the correct data all the time or usecontrols in an e-pected order. It is e-pected that errorBchecking features will be included

    in the system.The design and implementation of a realistic and easyBtoBunderstand user interface ise-pected.?our solution should include classes, methods and event3general procedures asappropriate.

  • 8/13/2019 COM616_Assignment_1_2013-14

    5/5

    Assessment:To obtain a 8 the minimum pass criteria listed must be achieved. Gigher grades will begiven for work of higher quality. "or e-ample a 78 D 7J8 for work of high quality in someareas and a 28 for work of high quality in all or most areas.

    %earning Outcomes 2ssessment riteria

    To achieve each outcome a student must demonstratethe ability to+esign applicationsappropriately for (indows 3(eb based environment.Implement applications thatrequire the use of datacontainers &including staticand dynamiccollections', user interfaces,and database interactions

    7uild a maintainable visual application, utilising a

    variety of controls and advanced features whereappropriate.

    +esign and create user defined classes

    #se and customise derived objects

    +evelop multiple classes and interacting objects

    +evelop applications usingan appropriate programminglanguage and developmentenvironment using a set ofrecogniKed standards fordevelopment, debugging andsystems testing.2nalyse and criticallyevaluate designs andproduce sufficiently detailedand precise documentation.

    Investigate the features and capabilities of the#nified $odelling language as an appropriate OOmodelling tool and produce appropriate diagrams.

    Implement testing strategy

    Luality will be demonstrated by the following

    1. reativity and adaptability!. @howing synthesis of concepts*. 7readth and depth of the solutionM. 2utonomy and independence/. oherence of system:. 4-tent of e-ploitation of the E#I;. 2 range of advanced features used

    =.