0% found this document useful (0 votes)
3 views2 pages

Java Objects and Tic-Tac-Toe Game

The document outlines a review module focusing on Java objects, object references, and building a Tic Tac Toe game. It covers key concepts such as class components, accessing elements in one-dimensional and two-dimensional arrays, and emphasizes incremental program development. The content includes code examples for array access and programming practices.

Uploaded by

rerife3137
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

Java Objects and Tic-Tac-Toe Game

The document outlines a review module focusing on Java objects, object references, and building a Tic Tac Toe game. It covers key concepts such as class components, accessing elements in one-dimensional and two-dimensional arrays, and emphasizes incremental program development. The content includes code examples for array access and programming practices.

Uploaded by

rerife3137
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Part 1 :

Module1 review

Obj : * Java objects and object references · Build tictac toe


game from
# One dimensional and two-dimensional video.
array
.

Incremental
*
program development.

parts of a class -

1) instance variables

2) Constructor method

3) Other methods

ID
Array's Accessing Elements

egi myArray char[]c] = new char(rows] (101]

Accessing all "slots in a now


Accessing all elements in an
Array Crow major order
inti = 0; for Linti = O, i < vows
; i ++ &

for (intj = 0 ; j(col ; j + + )E for (intj = 0


; j(20) ; j ++) &

sysout(myAnay(i]2j]) ; my Array [i] 253


=
1
3 3 3

Accessing
Array (column major
all elements in an

for(intj )
= 0 ; j< myArray 20] Length; j · ++

forLinti = 0
; i< Mytury length ; .
i +&
=
'

myArraycisci) ;
3

Incremental development
-
Start small and simple .

~
Code a little test a little .

You might also like