Assignment 1: Player’s Game Cards Management System

Assignment 1: Player’s Game Cards Management System

1. Overview

This assignment aims to establish a basic familiarity with the JDK development system and its associated on-line Java API class documentation. Students should apply the appropriate fundamental programming concepts (such as variables, constants, arrays, strings, methods, selection and repetition constructs etc.) and make use of appropriate Java API classes (such as Scanner, PrintWriter, String etc.) that they have learnt to solve the given problem.

2. Objectives

On completion of this assignment a student should be able to write simple Java application

that:

• Makes use of selection and repetition constructs to achieve desired outcomes

• Stores data to and reads data from arrays

• Generates output to and reads input from the console window

• Reads data from and writes data to text file

• Manipulates string using Java API “String” class

• Handles basic errors

• Applies object-oriented concepts

3. Scope

This assignment is based on individual effort. You are required to design, develop and test a Player’s Game Cards management system for a game application.

Besides providing the required functionalities, your program should incorporate appropriate error handling. Comments are also to be inserted to improve program clarity. Before you start coding your program, you are strongly advised to carry out proper problem analysis and program design. You are required to use JDK 1.5 developer version or later.

4. Requirements

This application allows the admin to

1. Admin login

1. Select Player to manage

1. Manage a Player game card

2. Create a game card

2. Delete a game card

2. Edit a game card information

2. Search and display game cards information

2. Back to previous menu

1. Change admin password

1. Logout

This application will have access to the following text files.

The first text file (Admin.dat) contains the administrator-hashed password (SHA-256).

For example

688787d8ff144c502c7f5cffaafe2cc588d86079f9de88304c26b0cb99ce91c6

The second text file (Players.dat) contains all the Player’s nickname in the following format

<Nickname>|<Hash Password>

For example

Ash|0b14d501a594442a01c6859541bcb3e8164d183d32937b851835442f69d5c94e

Misty|6cf615d5bcaac778352a8f1f3360d23f02f34ec182e259897fd6ce485d7870d4

Brock|5906ac361a137e2d286465cd6588ebb5ac3f5ae955001100bc41577c3d751764

Each Player will have a data file with the information of all their game cards in the following format

<Name>|Punch Energy>|<Fireball Energy>|<Kick Energy>

For example Ash.dat

Pikachu|30|15|40

Absol|20|50|15

Catepile|55|25|15

Zubat|20|10|10

For example Misty.dat

Bulbasaur|10|25|20

Pidgeot|20|20|30

Rattata|30|5|60

Raichu|5|15|10

Error Handling

Your program should be able to handle error situations. For example where a game card name already existed (for Create a game card) or game card name not found (for delete game card). You should look out for other possible exceptions and handle them too.

Testing requirements

Make sure that you are able to compile and run your program using the command ( javac AdminModule.java and java AdminModule ) directly from the command prompt from the project folder.

Set the default admin password to “asd”.

In the Players.dat, you should have the following three Player’s data.

Player nick name Password
Ash password1
Misty password2
Brock password3

(Remember to hash the players’ password)

Each player will have a dat file with at least 4 game cards.

For example Ash.dat

Pikachu|30|15|40

Absol|20|50|15

Catepile|55|25|15

Zubat|20|10|10

For example Misty.dat

Bulbasaur|10|25|20

Pidgeot|20|20|30

Rattata|30|5|60

Raichu|5|15|10

Make up the other player’s game cards information.

https://www.giantbomb.com/profile/wakka/lists/the-150-original-pokemon/59579/

5. Submission

A complete submission requires the following items:

Program in Zip file for execution (see below)

Missing in any of the above items is consider non-submission.

Late submission for any above items is consider late submission

Zip file instruction

Go to the Eclipse workspace folder, locate your project folder and then the src folder.

Copy all the dat files into the src folder (or the appropriate subfolders).

Make sure that you are able to compile and run your program using the command ( javac AdminModule.java and java AdminModule ) directly from the command prompt from the project src folder.


Comments are closed.