Problem 1 designing a solution to the problem and

Assignment Help Computer Engineering
Reference no: EM13348127

Problem 1. Designing a solution to the problem and implementing the design using principles of correct syntax, layout, and program structure.

a. Design of the hangman game

b. Class diagrams of all the classes made

c. Flowcharts (logic in user authentication and listing all players)

d. All Java codes (java files and text files used for saving data)

e. Marking schedule (a template can be found on Moodle)

Problem 2. You will be asked to demonstrate your work to your lecturer in the week of the due date. There will be a range of appointment times and you can choose your time. All assignments must be demonstrated. Scenario Through a friend's birthday party, you met a team manager (Jack) of a game company in New Zealand. Through a casual chat with Jacky, you found out that he and his team are planning to make a hangman game on popular mobile platforms including iOS and Android. You were interested so you proposed to him to outsource the project to you. Since the team Jacky is leading is overloaded with many other projects, he considered and later agreed to let you have a try at it.

Thus, before making the decision to pay you for the design and programming of the complete game, the company requested to you to make a text-based version of the game first. This text-based game should demonstrate your ability to finish the rest of the project by yourself and also give them a rough idea of how the complete version might look like. Tasks The followings are the recommended steps to design and then program the game. The strategy behind is to divide the whole development into two parts.

Part A involves designing and programming a simplified hangman game which allows player to guess a single word only. Part B involves extending the game to include more interesting features such as building a small word bank for the game, saving player's game stats, authenticating player's login name and password and registering a new player. You have a choice to follow these recommended steps or do it in your own way to finish the deliverables.

Part A:  Read the program scenario and some parts of the program specification (e.g. Gameplay) . Design a hangman game using structured English. Determine the variables, loops and decisions required for a single round of hangman game. A single round of hangman should involve asking player to guess a single English word through text input (keyboard) and output (screen) repetitively until he guessed every single letter of the word. Implement and validate the design in a single class with a main method. Revise the design and implementation iteratively if any mistake was made in the design.

Part B: Read the whole program specification carefully. Determine the classes required. Determine the attributes and methods required for each class. Draw class diagrams for the classes. Draw two flowcharts to visualise the program logic in authenticating player's login name and password and listing all existing players' details. Write the code for the classes. You may wish to test each of the major methods before writing the next, so that the same mistake is not repeated in multiple methods. . As you make your program, you might find a few things in your design that can be improved. Revise your design as you go.

Hint on getting your code compiled: If you cannot get some code to compile or if it causes your program to crash immediately, comment out that piece of code so that your program can be run. Program requirements Over several meetings with Jack, you and Jack worked together to finalise how the game should work and look like. You agreed to a set of requirements. These requirements are detailed over the next few pages. Please make sure your game satisfy these requirements.

When the program starts:

a. Display a welcome message. (Be creative with your welcome message)

b. Read the players text file (hangmanPlayers.txt) and store all the player records of the file into an array.

c. On the screen, display the total number of player records read from the file.

d. Display a prompt and wait for player to enter an option (Player either register or login as an existing player) Sample screen (the number of records shown is a sample only):

2. User authentication (when login as an existing player)

a. Asks player his login name and password

b. Search through the existing players to find out if there is any player with the same login and password. The authentication should be case sensitive!

c. If a record is found, the authentication is successful and the player with the matching login and password should be made as the current player. Display the current player's game stat (how many words he has guessed successfully).

d. If no matching record is found, ask player to enter his login name and password again until they match a record in the system. Sample screen (When login succeeded) Sample screen (When authentication fails)

3. User registration (when registering a new player) a. When registering a new player, prompt player to enter a new login name and a new password. The password should be entered twice to avoid any mistake from the player in the first attempt. b. If the two entered passwords do not match, repeat the process again . Sample screen

4. Gameplay

a. When a new game starts, it should display the word that is being guessed. The word should be covered by asterisks * ("little stars"). The number of asterisks should match the length of the word being guessed.

b. The program should prompt player for a String input, but only take the first character of the input. E.g. if player entered "acdc" in the input box, the program should take 'a' as the guessed character and discard the rest of the input.

c. The program should display whether the character entered has matched any of the word. Display a message according to the result and redisplay the asterisks with the characters that have been guessed successfully. (See sample screen below)

d. The game should display the characters that have been guessed so far. Sample screen (Screen after welcome and login is completed) After 5 minutes of guessing.

5. Additional features to make the game complete and more exciting to play!

1) The program should limit the number of wrong guesses allowed by player to 6 guesses per game. A game should finish after all 6 wrong guesses. It should display the number of guess left after each guess (only if the player guessed a wrong character, the program decrement the number of guesses).

2) Inform player if a character has been guessed already! Sample screen

3) After a round of game is finished, the program should prompt the player to decide whether to guess another word or exit. If player chooses to guess another word, his stat (number of words guessed) should first be updated and then store to the text file before another round of hangman starts. Otherwise, the program should save the player's stat to file and go back to the login screen. Sample screen (If player chooses to play on) Sample screen (If player chooses to finish)

4) The program should store player's details in a text file. This includes player's login name, password and how many words have been successfully guessed by player since registration. This information should be updated whenever a word has been successfully guessed.

5) The program should have a mini word bank to keep the game challenging. Build a word bank of at least 10 words. Every time an existing player plays, he should get a new word or even better if the word can be randomly selected from the bank. Some ideas: Use a string array or a text file for storing the words. Or even better, grab words from the news of the day from the Internet?

6. Advanced features

1) At registration, inform player if a login name has already been used.

2) Add some graphics to the game; you can display a hangman using ascii characters.

3) The program should always have an administrator's account in the login system by default (login name and password should both be "admin"). When an administrator logs in, he should be able to do the followings.

a) When option 1 is selected, a list of all the existing players and their details (name, password and game stat) should be displayed.

b) When option 2 is selected, the program should exit to let administrator play a game of hangman! Sample screen (Admin login and listing all users) Data validation and text file One text files is required: 1. hangmanPlayers.txt - this file is used for storing players' details. A player should have a login name, password and how many words he has guessed successfully. At the start of the program, the players file is to be read once and the contents of the file are to be stored in an array.

The file should be written every time a new player is registered or a word has been successfully guessed. All changes to player records should be done in an array first! Error Processing All input must be validated as follows: Input Valid Values Error Message Admin menu option 1,2 Error! Please select a menu option from 1-2: Login name (at registration) A unique new login name. The login name is already in use, choose another one. Answer Either "y" or "n" Error! Please enter y or n: Login and password (at login in as an existing player) Valid login and password Sorry, either your login or password is wrong!

When reading player records from file File should exist in the same directory as the program. hangmanPlayers.txt could not be opened for some reasons. WARNING It is your responsibility to ensure that the correct source file is present in the Moodle upload, with the correct filename, and that it compiles without errors in a Unitec laboratory. Failure to meet any of these requirements may mean that you lose marks for the operation of your program.

The assignment must be a product of your own work except for use of resources supplied with the course, discussions conducted by the lecturer during class time, and other assistance shown as acceptable in the section Assistance to Other Students. Marking See the marking guide on the last page for details. Your lecturer may use an oral examination to test your understanding of the material submitted. Assignments which are submitted up to one day late (Tuesday after 8:30am to Wednesday 8:30am) will be marked, but cannot achieve more than a C (pass only) grade. Assignments handed in more than 24 hours late will not be marked unless Special Assessment Circumstances apply, so it would be better to hand in an incomplete assignment on time.

Special Assessment Circumstances Students who, due to circumstances beyond their control, miss a test, exam or an assignment deadline or considering their performance in a test, exam or assignment to have been adversely affected, should complete the form available from the Student Central. Within any semester, a student may have only one SAC per course. When requesting an SAC for an assignment, the application form must be submitted (along with work completed to date) within the time frame of the extension requested i.e. if the Doctor's Certificate is for one (1) day, then the form and work completed must be submitted within one (1) day. Assistance to other Students Students themselves can be an excellent resource to assist the learning of fellow students, but there are issues that arise in assessments that relate to the type and amount of assistance given by students to other students. It is important to recognise what types of assistance are beneficial to another's learning and also what types of assistance are unacceptable in an assessment. Beneficial Assistance . Study Groups. Discussion. Sharing reading material.

Testing another student's programming work using the executable code and giving them the results of that testing. Unacceptable Assistance. Working together on one copy of the assessment and submitting it as own work.

Giving another student your work. Copying someone else's work. This includes work done by someone not on the course. . Changing or correcting another student's work. Copying from books, Internet etc. and submitting it as own work. Anything taken directly from another source must be acknowledged correctly: Specify the parts that are taken from other sources and give proper acknowledgement to the original author. For this assignment, however you are expected to do everything by yourself. Do you want to do the best that you can do on this assignment and improve your grades? You could: Talk it over with your lecturer Visit Te Tari Awhina or Maia for learning advice and support. Visit the Centre for Pacific Development and Support.

Reference no: EM13348127

Questions Cloud

A business report identifying auditing procedures and : a business report identifying auditing procedures and practices of any selected organisation of australia. this report
Crusty pizza executives are considering opening several new : crusty pizza executives are considering opening several new stores and they would like a forecast of monthly profit for
1 prepare a code of ethics for an organization of your : 1. prepare a code of ethics for an organization of your choice. for each point in the code of ethics explain an ethical
Read the case on williams-sonoma and answer the written : read the case on williams-sonoma and answer the written response questions in order to complete this assignment.
Problem 1 designing a solution to the problem and : problem 1. designing a solution to the problem and implementing the design using principles of correct syntax layout
Question 1a major us automaker has evaluated that the city : question 1a major u.s. automaker has evaluated that the city mileage for one of its new suv models is normally
Create a powerpoint presentation about the marketing : create a powerpoint presentation about the marketing strategy for this relatively new product. your powerpoint
Part 1question 1 a dihybrid cross of two plants is : part 1question 1 a dihybrid cross of two plants is done and the seed pod shape is checked. the seed stock was
Suppose the conductor arrangement of a power line under : suppose the conductor arrangement of a power line under planning shown below. the line will connect the hydroelectric

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd