Docsity

Project 1 Using Java - Computer Programming I | CS 121, Study Guides, Projects, Research of Computer Science

Toggle sidebar
bg1
Keep copies and backups of your work at all times!
Page 1 of 4
CS121/IS223 - Project 1 (Using Java)
Your final project (documentation and code) is due at the start of class on: 03/03/091.
Interim deadline: 02/17/09 I would like to see the first version of your game flowchart in
class on this date so that I can check the logic makes sense and is of sufficient complexity
to obtain a passing grade if completed. I want to also check that your design ideas can be
implemented using the constructs introduced in class. Bring your design to class.
Important
This is an individual project and you must not share designs, code or any documentation
with other students. Please remind yourself of the CSIS Student Responsibilities
regarding academic integrity. This is attached to the end of the course syllabus and can
also be downloaded from my website http://csis.pace.edu/~ogotel.
INTERACTIVE TEXT-BASED COMPUTER GAME
Using the example given in class as inspiration, your task is to invent and program your
own interactive text-based computer game. It is very important that you start thinking
about your project early on and do things in stages, as the month you have to do your
project will pass before you know it. There is no excuse for late or missing work!
You should have sufficient knowledge to start designing and writing pseudocode for your
project. Firstly, draw up a flowchart for your game (or any diagram that shows the logic).
It is important that you examine and think about any decisions that may need to be taken
based on user input and any iteration that may need to occur. Try writing the logic for the
various component aspects of your game. Start simple and have some fun during this
stage. How are you going to error check?
Once you have designed your game and are happy it will work on paper, your task will be
to think about how you can translate this into a Java program so that a user can
interactively play the game. Some of the constructs you will need to implement your
project will have already been covered in class. Other constructs will be presented during
the next few classes. The more you can use the constructs from class, particularly those
constructs that improve the style of your program (i.e., methods), the better. Again, start
simple and code small bits of your program and test it. Add bits slowly and surely as you
write and test them, as shown in class. Leave any fancy dialogue you want to use to
interact with the user until you have the logic sorted. Don’t try to do everything in one
go.
While it will be possible to complete the coursework using the Java covered in classes,
you are free to use other features of the language if you want. You may need to reference
Java documentation (API) and Java books if you decide to take this route.
1 We will try to alloca te time in class for stu dents to try and review each other’s game. It is there fore important to make sure y our
game is easy to use and able to deal with malicio us users and spu rious input! During this class, you may have a brief interview with
the instru ctor -- you will be expected to explain your work and a nswer questions on it. We will vote o n a winning game, based on
fun/novelty/etc.
pf3
pf4

Partial preview of the text

Download Project 1 Using Java - Computer Programming I | CS 121 and more Study Guides, Projects, Research Computer Science in PDF only on Docsity!

CS121/IS223 - Project 1 (Using Java) Your final project (documentation and code) is due at the start of class on: 03/03/ 1 . Interim deadline: 02/17/09 I would like to see the first version of your game flowchart in class on this date so that I can check the logic makes sense and is of sufficient complexity to obtain a passing grade if completed. I want to also check that your design ideas can be implemented using the constructs introduced in class. Bring your design to class. Important This is an individual project and you must not share designs, code or any documentation with other students. Please remind yourself of the CSIS Student Responsibilities regarding academic integrity. This is attached to the end of the course syllabus and can also be downloaded from my website http://csis.pace.edu/~ogotel. INTERACTIVE TEXT-BASED COMPUTER GAME Using the example given in class as inspiration, your task is to invent and program your own interactive text-based computer game. It is very important that you start thinking about your project early on and do things in stages, as the month you have to do your project will pass before you know it. There is no excuse for late or missing work! You should have sufficient knowledge to start designing and writing pseudocode for your project. Firstly, draw up a flowchart for your game (or any diagram that shows the logic). It is important that you examine and think about any decisions that may need to be taken based on user input and any iteration that may need to occur. Try writing the logic for the various component aspects of your game. Start simple and have some fun during this stage. How are you going to error check? Once you have designed your game and are happy it will work on paper, your task will be to think about how you can translate this into a Java program so that a user can interactively play the game. Some of the constructs you will need to implement your project will have already been covered in class. Other constructs will be presented during the next few classes. The more you can use the constructs from class, particularly those constructs that improve the style of your program (i.e., methods), the better. Again, start simple and code small bits of your program and test it. Add bits slowly and surely as you write and test them, as shown in class. Leave any fancy dialogue you want to use to interact with the user until you have the logic sorted. Don’t try to do everything in one go. While it will be possible to complete the coursework using the Java covered in classes, you are free to use other features of the language if you want. You may need to reference Java documentation (API) and Java books if you decide to take this route. 1 We will try to allocate time in class for students to try and review each other’s game. It is therefore important to make sure your game is easy to use and able to deal with malicious users and spurious input! During this class, you may have a brief interview with the instructor -- you will be expected to explain your work and answer questions on it. We will vote on a winning game, based on fun/novelty/etc.

Important: this is an open-ended project and the game can be as simple or as intricate as you want -- it is up to you to take your project as far as you can go with it! The game must contain (at a minimum) assignment statements, variables, conditionals, loops and methods. You will be awarded marks on how appropriately and neatly you use these constructs, and try to use the Java class libraries effectively, and on how well you comment and document your code, how exhaustively you test all the paths in your program, and there will be a mark for originality and complexity in your idea. While you can use it for inspiration, DO NOT simply copy the example used in class. Each game should be unique. You will get extra marks if it is fun or cool. Bottom line – I prefer a neat, clearly organised, well thought out and thoroughly tested small program that a huge one that is a mess and not properly tested! NO SPAGHETTI CODE – SERIOUSLY!!! NO UNTESTED CODE – VERY SERIOUSLY!!! & ABSOLUTELY NO DUPLICATION … BE SMART ABOUT THIS! If you are a little further along with your coding, here are some ideas to extend your game:

  • Allow multiple players
  • Have the computer take on the role of one of the other players (the computer must make intelligent choices)
  • High score table which shows the top 10 players names and scores
  • Store the current game state and/or high score table to disk to re-load the next time (requires input and output to file, coupled with exception handling)
  • Introduce a time factor into your game, e.g. playing against the clock
  • Have random elements
  • Look at using Java collections Assessment Your project requires you to design, code, test and document quite a challenging piece of software! This project is worth 10% of CS121/IS223, so use your time accordingly. The marks will be allocated as follows:
  • Design of game [10 marks] o Flowchart/diagram to show the overall game structure and logic – descriptions of your design prior to coding (i.e. your algorithm)
  • Creativity [10 marks] o is your game interesting, novel and fun? (perhaps add random elements)
  • Code [50 marks] o overall structure (i.e. neat – no spaghetti code – no duplication - use of methods) o exception/error handling (i.e. handles tricky users and does not crash) o useful comments (where needed) o use of sensible variable/method names o correct implementation of control structures (conditionals and loops) o attention to user interaction (spelling!)
  • Testing [10 marks]

make 2 copies of your overall deliverable (one for the instructor and one for yourself) because a copy of your work will be kept by the instructor. You will be demonstrating your working application in class on 03/03/09, so please be ready to show it and your documentation. Deadline – start of class on 03/03/ Your projects will be assessed by demonstration and then by review of your supporting documentation. Demonstrations will take place in class, so make sure your programs work in the labs. As preparation, you must arrange for your files to be available and usable. No excuses! Why am I doing this? The purpose of the project is to give you practice in writing a reasonably complex Java program on your own, a program that combines concepts, statements and techniques covered separately in the classes and exercises. As you learn more about object- orientation we will look how your games could be redesigned. You could also look at how you could create a graphical user interface for your game in the future too. GETTING HELP I am here to help you along the way. To make sure you get the best possible marks for your project, you can show me or the CSIS tutors the things you do each week as you progress. Don’t get stuck - you never lose marks for asking questions and seeking help. You can talk to your classmates and get help, but do not copy each other’s work – this is easy to spot you know! So, always list who helped you and with what in your write up! **HAVE FUN WITH IT!!! BE CREATIVE/BE INDIVIDUAL TRY TO BE SMART/NIFTY…BUT REMEMBER YOU ARE STILL LEARNING I will bring some past examples to class for you to see…


Dr Olly Gotel Department of Computer Science CSIS Pace University Spring 2009 [email protected] http://csis.pace.edu/~ogotel/teaching/cs121spring09.htm**