Computer Science: Application Project

profilekevin_kim212
Project.docx

In this unit, you’ll get to combine all of the new skills you’ve learned to create your own project from scratch!

In this exercise, you’ll brainstorm a few ideas for potential final projects, and think about how you might implement them.

Think about what sort of projects you might want to create. What are the Java Classes that might make up these projects? What instance variables and data structures will you need to use to implement these Classes? What should these Classes be able to do? Is this project too large to finish in your timespan for this class, too small, or just right?

For example, remember our Black Jack project from earlier. For that project, we created a Card class that had a rank, a suit, and a value. We created a Deck class that had an ArrayList<Card>. We created a Hand class that had an ArrayList<Card>. We put everything together with the BlackJack class that had a single Deck, and played a Hand for the player against a Hand for the dealer.

Jot down your project ideas here. List out some of the Classes you’ll need to make, as well as how those Classes might be designed. What instance variables will these Classes have? What should these Classes be able to do? Discuss your ideas with your classmates as well as your teacher!

______________________________________________________________________________

Now that you’ve decided what you’ll be creating, it’s time to use Top Down Design to break up your project into manageable problems. Work with a classmate to figure out how you can break your project down into smaller problems that you can solve and test out one by one. We call these small problems milestones, or checkpoints. Estimate how long each of these problems will take to solve.

For example, when we were building the Battleship game, we broke down the problem into 10 milestones:  1. Write the Ship Class  2. Write the Location Class  3. Write the Grid Class  4. Add a method to the Grid class that adds a Ship to the Grid(public void addShip(Ship s))  5. Write the Player Class  6. Write the Battleship Class  7. Give Players the ability to guess Locations on the enemy Grid  8. Allow the user to select starting Locations for their Ships  9. Initialize the computer Player’s Grid randomly with Ships  10. Alternate user and computer guesses until someone wins

List out each of your milestones, and how long each will take to complete. This will help guide you when you’re writing the code for your project.

Discuss your milestones with your teacher before you start to code!

______________________________________________________________________________

Time to put it all together! Following the milestones you laid out for yourself, write the code for your final project. Test your code along the way to make sure you’ve solved each milestone.

Since you’ll need to be able to add multiple files to your project, you should write your code in the Sandbox at https://codehs.com/editor/sandbox  Create a new program of type “Java Console” and create your project there. When you’re finished, copy and paste a link to your program here in the editor.

And remember, have fun! This is your chance to build your very own creation from scratch!