left0UNIVERSITI TUN HUSSEIN ONN MALAYSIA<br />FACULTY OF MECHANICAL AND MANUFACTURING ENGINEERING <br />BTI 1022: COMPUTER...
Upcoming SlideShare
Loading in …5
×

Bti1022 group assignment

461 views
422 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
461
On SlideShare
0
From Embeds
0
Number of Embeds
51
Actions
Shares
0
Downloads
32
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Bti1022 group assignment

  1. 1. 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 /><ul><li>Show the elevator movement to the destination entered by the 2 passengers.
  2. 2. 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.</li></ul>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 />

×