Create a class structure flow chartfor yourprogram

Assignment Help Programming Languages
Reference no: EM131922174

Assignment: Haunted House

For this assignment, you will be building a class, creating objects, doing comparisons and using nested control statements. You need to remember what you have learned in class, lab, books and your assignments. Be sure to refer to them when you need to.

There are 2 parts to this assignment. In the first part, you are going to be given a problem and you will then need to create a structure,write algorithms and a flow chart to solve it. In the second part, you'll be turning this into a java program.

So let's get started!

Part 1: Your haunted house adventure!

Ever since you were a little kid, there has been this one house at the end of the street that is dark and scary. Everyone says that its haunted! Of course, you don't believe in those things, but it has inspired you, so you've decided to create an interactive haunted house adventure for your friends. Here's the layout of the house:

The user always starts the game at the front door and must immediately decide where they want to go. Your movement constraints are as follows:

• From the front door, the user must choose between going into the livingroom, dining room or up the stairs.

• To get from one room to the next, there must be a door. That means that to get to some rooms, the user must go through other rooms. See the above diagram for more details.

• If the user is in a room that is attached to another room via a door (not the one they just came in-no backtracking! ), the user must be given the option between going to the other room or exploring an item in the current room.

• If the user is in a room that has no other exit, then they must be given the option between exploring the items in the room.

Program Flow:

• Ask the user to enter their name so that you can personalize their experience. You will want to use their name as they move through the house and make decisions

• Start at the front door as described above.

• Each time the user moves to a new room, you must then ask the user what he or she wants to do next. The options available are derived above. Note that there are sometimes more that 2 options available.

• Should the user reach a room where there is no other exit, they must select an object to explore.

• Once the object is explored, the game is over. This should be indicated clearly to the user (and have fun!).

Input/Output Requirements:

• As stated above, you must ask the user for his or her name.

• Welcome the user to the game. Be sure to include their name in your welcome message.

• Using ascii art or graphics, print out an image showing where in the house the user is starting.

• For each step, present the users with their options and ask them what they want to do (hint: put word options in quotes to indicate what they should type in to respond to your question)

• Once they have selected an object to explore, be sure to print out their final outcome.

• At the end of the game, using ascii art or graphics, print out an image showing where in the house the user ended the game.

Program Structure Requirements:

• For your class structure, you must use classes, objects and methods.

• Do NOT just use a huge series of sequential if statements, nested if statements or switch statements for your program flow

Program Structure Requirements:

• For your class structure, you must use classes, objects and methods.

• Do NOT just use a huge series of sequential if statements, nested if statements or switch statements for your program flow

For Part 1, create a class structure,algorithmsand flow chartfor yourprogram, and then do several iterations of tests (i.e., analyze it and step through to make sure that it is logically correct). Also write the pseudocode for your testerclass (where your main will go). Put these in a Word or Open Office document. You'll turn that document in with the program that you create in Part 2.

Part 2: Creating your Haunted House program

Once you are done writing and testing your class structure and algorithm, you are ready to start coding!

1. Once again, you first you need to create a project. Here's a nice tutorial on how to do that in Netbeans. If you are using Dr. Java or Eclipse, just do a quick search on youtube.com and you'll find lots of candidates.

Youtube Video: "Making a Simple GUI App with NetBeans"

Be sure to give your project a nice, meaningful name (and make sure it adheres to Java's naming conventions).

2. Once you have your shell ready, there are a few things to know before you start translating your algorithm into code

• At the top of your class file, be sure to include the following:

//********************************************************************************
// PANTHERID: [PantherID]
// CLASS: COP 2210 - [Semester Year]
// ASSIGNMENT # [#]
// DATE: [Date]
//
// I hereby swear and affirm that this work is solely my own, and not the work
// or the derivative of the work of someone else.
//********************************************************************************

3. Now start translating your algorithm into java code.

• Remember to code and then compile frequently. It will make it easier to find any bugs.
• Also remember that you will need to create a testerclass (where your main method will reside).

4. Once you get your program running correctly, run through 3 scenarios (we will, of course, be testing your other scenarios, but use these for your output):

• Finish in the Living Room
• Finish in the Master Bathroom (choose either option)
• Finish in the Pantry (choose either option)

5. Here is one more thing to do. Any input requested from the user and/or output received from the user should be in a window (see E.1.14 and E.1.15 from lab 1). At this point, you probably have your output going to the console. For your final submission, it needs to go to a window (JOptionPane). Don't forget any additional libraries that you need to import to do this.

That's it! Now you have written your first adventure game! Of course, you'll also need to turn it in to Moodle.

Submission Requirements

You must upload a zip file to Moodle that includes your complete source project in Netbeans, ready to load (We have been very lenient up until now regarding this. From this assignment on, you will lose points if you do not include your complete project.), and also contains the output in separate data files, and your Word/Open Office document with your algorithm.

VERY IMPORTANT: If you do not provide output in separate, easy to find data files, I will assume that your program does not work on those test cases, and grade accordingly. Do not embed the output in your source code.

Attachment:- Assignment.rar

Reference no: EM131922174

Questions Cloud

Which relative frequencies would be expected among progeny : Which phenotypes and which relative frequencies would be expected among the progeny from the mating of this male to a female with ruby eyes and dumpy wings?
What should be the size of repayment : What should be the size of each repayment if the loan is to be amortized at the end of the term? (Round your answer to the nearest cent.)
Calculate the price per unit to charge to earn the profit : Admore is the leading producer of presentation folders. last year, the company produced 50,000 units. This year the company anticipates producing.
Should the firm accept or reject the order : On past experience, the credit controller reckons that there is a probability of 33% that bad debts will arise.
Create a class structure flow chartfor yourprogram : Create a class structure,algorithmsand flow chartfor yourprogram, and then do several iterations of tests. You'll turn that document in with the program.
Journalize the closing entry to allocate net income : Compute each partner's share of the $72,000 net income for the year. Journalize the closing entry to allocate net income for the year.
Take action that led to on-time payments : What is Leyton's DSO.hat what would it be if all customers paid on time , and how much capital would be released if Leyton could take action that led to on-time
Compute the fixed overhead budget and volume variances : Standard direct labour-hours allowed for the actual output - 13,600. Compute the fixed overhead budget and volume variances
Senior debt and has net tangible assets : Currently, the company has outstanding $100 million of senior debt and has net tangible assets of $201 million.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write program to list all english-math and science teachers

Suppose that input consists of a file of teachers. You are told to write a program to list all English, math, and science teachers. Each teacher can teach only one subject.

  Set fs script before processing records

Set FS script before processing records. This is also a good place to set up an array of month names in chronological order - you want to try sorting the catagory section.

  Write function to compute average temperature for the month

Write the function, print_temps(), with same two parameters plus count of hot days. Print neat table of temperatures. At same time, compute average temperature for the month.

  Create class to calculate perimeter and area rectangle

Create class Rectangle. The class has attributes length and width, each of which defaults to 1. It has read-only properties that calculate the Perimeter and the Area of the rectangle.

  Implement a lexical and syntax analyzer

Implement a lexical and syntax analyzer based on the following grammar. Your analyzer should read an input test program from a file and then determine if it contains a syntax error

  Create a new console application project

Create a new console application project and name it "Week1Lab_BirdN". Create the necessary member functions that will perform the required operations outlined in the lab summary above.

  Distinguishing web pages or web servers for task

Distinguish between any Web pages or Web servers you would use for this task.

  Fortran-77 to sort an array of numbers entered

Write a program in Fortran-77 to sort an array of numbers entered from the keyboard and then using binary search, search for a number in the array.

  Implement a program to learn vocabulary of foreign languages

We want to implement a program which will help students learn the vocabulary of foreign languages. The first step, which has been assigned to you, is to build a data structure representing a list of English words and their translation in a foreign..

  Display the total price of the cup of coffee

Create a UseTVShow.java file that prompts the user to input up to 5 TV shows and stores the data in an array of objects first, then displays them as a list.

  Write a script that inputs a numeric check amount

Write a script that inputs a dollar amount to be printed on a check, then prints the amount in check protected format with leading asterisks if necessary. Assume that nine spaces are available for printing the amount.

  Design logic for a program contains housekeeping

Design the logic for a program that contains housekeeping,detail loop,and end-of-job modules,and that calculates the service of charge customers owe for writing a bad check.

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