1130tutorial13

1130tutorial13 - CSC1130Introductionto ComputerProgramming...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
CSC1130 Introduction to  Computer Programming Tutorial 13 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Assignment 7 - Level 9 - = = = = = = = = = = = = = = = | | | 2 2 3 2 3 3 | | 3 3 2 2 X 2 | | G 3 2 X 3 2 2 O | | 3 2 2 X 3 3 | | 3 3 3 2 3 2 | | | = = = = = = = = = = = = = = = Please choose a direction ([2]down [4]left [6]right [8]up [0]quit): 2
Background image of page 2
Object Design In this assignment, you do not have a  detailed   assignment specification. You should have your  own design  with the following  required  classes: RoadBlockUI RoadBlockGame RoadBlockMain 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Object Design You are  free  to have  any instance variables  and   methods . You have to design  other necessary classes . However, make sure your design makes proper  use of  OO concept . Inheritance Encapsulation 4
Background image of page 4
UI Requirements Make sure your UI  satisfies  the requirements. Display initial map You have to  display the initial map  before starting each level. Clear presentation of the map The map that you show should be  clear . Keep the display of the map updated The map and its level have to be  updated accordingly  after each  user input. Path of the ball You have to show  the path  of the ball. 5
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
UI Requirements Input prompt You have to  ask for input  from the user for each move.  If you design  TUI , use the keys  2 ’ for  down , ‘ 4 ’ for  left 6 ’ for  right , ‘ 8 ’ for  up , and 0 ’ for  quitting the program . Failing the current level If  the ball gets out of the map display the resultant map,  show a message to tell the user  the current level will be  restarted , and  wait for the user’s input. 6
Background image of page 6
UI Requirements Finishing the current level If  the ball enters the exit gate , display the resultant map, show a message to tell the user  the next level will be started , and wait for the user’s input. Finished all the levels (Winning) Congratulate  the user after finishing all the ten levels. 7
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
File Format File format of the map file 7 12 EEEEEEEEEEEE EBEEEEEEEEBE EBEEEEE3EEBE EBEEEEEEEEBE EEEEEEEEEEEE EEEEEEEEEGEE EEEEEEEEEEEE 2 4 The height and width of the map Initial position of the ball 1st  No:  Vertical  coordinate from the  top , starting from  0 . 2nd  No:  Horizontal  coordinate from the  left , starting from  0 . The map Characters Representations E Empty space B Diamond 1  -  9 Rock G Exit gate 8
Background image of page 8
File I/O Classes to read file Class  File Operates on file Class  FileReader Reads character file. Class 
Background image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/28/2010 for the course CSC CSC1110 taught by Professor Cjyuan during the Fall '06 term at CUHK.

Page1 / 31

1130tutorial13 - CSC1130Introductionto ComputerProgramming...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online