left0UNIVERSITI TUN HUSSEIN ONN MALAYSIA<br />FACULTY OF MECHANICAL AND MANUFACTURING ENGINEERING <br />BTI 1022: COMPUTER PROGRAMMING<br />Group Assignment (10 Marks)<br />Complete the following task in a group not more than 4 members. The due date for this assignment is on April 1st, 2011 (Report). All reports must be handed in to your respective lab instructors. The marking scheme is as follows:<br />Report (hard and soft copy): 6 Marks<br />Presentation: 4 Marks<br />Total: 10 Marks<br />Task:<br />FKMP has a new building with a maximum level of 6 and the lowest is G floor. As a FKMP student you were ask to program the elevator movement. Simulate the elevator movement either up or down depending on the users input. Maximum passenger for the elevator is 2 passengers. <br />Note:<br />
Show the elevator movement to the destination entered by the 2 passengers.
The elevator will move to the destination base on ‘the shortest job first’ otherwise it depends on the first passenger destination. The program should able to recognize if the level entered is the current position and only execute the correct destination.
Live example of the program running: <br />http://www.screencast.com/t/hWlVQOPyg<br />Or at least:<br />http://www.screencast.com/t/jgDXjmqr44d<br />Output Example (User input is in bold):<br />Destination level: 2<br />Destination level: 1<br />You are moving up<br />Level G<br />Level 1<br />You have arrived. See you again<br />Level 2<br />You have arrived. See you again<br />Destination level: 0<br />Destination level: 1<br />You are moving down<br />Level 2<br />Level 1<br />You have arrived. See you again<br />Level 0<br />You have arrived. See you again<br />Destination level:_<br />