1130tutorial8

1130tutorial8 - CSC1130 Introduction to Computer...

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

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

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

View Full DocumentRight Arrow Icon
    2 Assignment 5 Assignment 5 is released! Release Date: 22 October 2007 You have to implement an applet game called  Hey That's My Fish .
Background image of page 2
    3 Submission of Assignment 5 Part A  Due Date: Ice.java and Penguin.java 23:59 (midnight), 1 November 2007 Subject: "CSC1130 HW5 A  your_name std_id" http://www.cse.cuhk.edu.hk/~csc1130/submit/hw5 a .html Part B  Due Date: HeyThatsMyFish.java 12:00 (noon), 5 November 2007 Subject: "CSC1130 HW5 B  your_name std_id" http://www.cse.cuhk.edu.hk/~csc1130/submit/hw5 b .html
Background image of page 3

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

View Full DocumentRight Arrow Icon
    4 Aim of Assignment 5 To reinforce you with boolean expressions as  well as if-then-else statements. To familiarize you with the use of  repetition  statements while-loops for-loops
Background image of page 4
    5 Hey That's My Fish
Background image of page 5

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

View Full DocumentRight Arrow Icon
    6 Classes There are totally 6 classes in this assignment Ice Penguin HeyThatsMyFish (core) Pond Player HeyThatsMyFishApplet (applet) These 3 classes are to be written by you Easy Difficult
Background image of page 6
    7 How to run an Applet? 1. Compile the Java source code. 2. Prepare an HTML file containing: <html> <head> <title>CSC1130 Assignment 5 - Hey That's My Fish</title> </head> <body> < applet code="HeyThatsMyFishApplet.class" width="581" height="487"> < /applet > </body> </html> The name of the Applet class file The dimension of the applet
Background image of page 7

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

View Full DocumentRight Arrow Icon
    8 How to run an Applet? 1. Place the HTML file with the Java class files in  the same directory. 1. Run the applet Method 1 - Open the HTML file in a browser. Method 2 - Using Java AppletViewer: appletviewer HeyThatsMyFish.html
Background image of page 8
    9 Hey That's My Fish It is a two-player board game. Each player has four penguins. Aim: You have to catch as many fish as possible  with your penguins.
Background image of page 9

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

View Full DocumentRight Arrow Icon
    10 The Coordinate System (0,0) (10,0) (0,7) (10,7) (0,4) (3,0) (3,4) X Y Width = 11 Height = 8 (6,0) (6,7) 0 10 1 2 3 4 5 6 7 8 9 0 7 1 2 3 4 5 6
Background image of page 10
    11 The Coordinate System (0,0) (10,0) (0,7) (10,7) X (3,0) (3,4) (6,0) (6,7) 0 10 1 2 3 4 5 6 7 8 9 0 7 1 2 Y Width = 11 Height = 8
Background image of page 11

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

View Full DocumentRight Arrow Icon
    12 The Coordinate System (10,0) (0,7) X Y (3,0) (3,4) (6,0) (6,7)
Background image of page 12
    13 The Pond Ice  floes Current  player Next  player Number of fish caught so far
Background image of page 13

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

View Full DocumentRight Arrow Icon
    14 How to play Three stages: 1. Placing Penguins Each player has to  select four different ice floes with   ONE  fish  underneath for their penguins alternatively. 2. Moving Penguins Each player has to  select one of the four penguins  and  move  the penguin  to a new ice floe . 3. Game Over When  all the penguins  of both players  cannot move .
Background image of page 14
    15 Stage 1 – Placing Penguins Green player's turn: She has to choose an  ice floe with  ONE  fish  underneath for her  first   penguin.
Background image of page 15

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

View Full DocumentRight Arrow Icon
    16 Stage 1 – Placing Penguins The selected ice floe by  green player.
Background image of page 16
Image of page 17
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 / 59

1130tutorial8 - CSC1130 Introduction to Computer...

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

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