CSC 1302 Principles of Computer Science II Assignment 3: Writing Java Programs with Arrays, Objects

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (6 votes)

Purpose:
An array is a container object that holds a fixed number of values of the same type. The length of
an array is established when the array is created. After creation, its length is fixed. An array is
used to store a collection of data, but it is often more useful to think of an array as a collection of
variables of the same type. Following are some important points about Java arrays.
● The variables in the array are ordered and each have an index beginning from 0.
● Java array can be used as a static field, a local variable, a method parameter, or a return
type.
● Array can contain primitives (int, char, etc) as well as object (or non-primitives)
references of a class depending on the definition of array. In case of primitive data types,
the actual values are stored in contiguous memory locations. In case of objects of a class,
the reference to the actual objects are stored.
● 2D Arrays can be defined in simple words as array of arrays. Data in multidimensional
arrays are stored in tabular form.
In this assignment, we will refresh what we learned about arrays and graphics objects in java
The graphics assignment will have to use the DrawingPanel.java file to draw a window on the
screen first, then draw shapes on the Graphics object.
Program #1:
Write a program of a game of Tic-Tac-Toe that represents the board by using of 2D Array.
– Play the game 1 time for 2 players;
– Show who the winner is (Player 1, Player 2, or Draw)
– Name the program as TicTac.java, a screen output will be similar to the following.
Program #2:
Finish the following programming project. An output picture will be like the following. A
scanned copy of the project description is also attached.

Criteria:
1. Upload all of the .java and the .class files to the CSc1302 dropbox on http://
icollege.gsu.edu.
2. Your assignment will be graded based on the following criteria: (a) Are your programs
runnable without errors? (b) Do your programs complete the tasks with specified outputs?
(c) Do you follow the specified rules to define your methods and programs? (d) Do you
provide necessary comments include the programmer information, date, title of the
program and brief description of the program.
3. Make sure that both the .java and .class files are named and uploaded to icollege
correctly. If any special package is used in the program, be sure to upload the package
too. Should you use any other subdirectory (whatsoever) your program would not be
graded, and you will receive a 0 (zero).
4. No copying allowed. If it is found that students copy from each other, all of these
programs will get 0.