java programming team project activity

33
1 Oracle Academy Java Programming Institute: Day 1 Team Project Activity Matching Game Now that you have learned the basics of Greenfoot and Eclipse, it's time to share your knowledge with others. You will create a matching game that teaches a novice user some key programming concepts you have learned. Each team will present their game to the class. Teams will be critiqued by their peers, and assess themselves against two rubrics for the presentation and game.

Upload: timyd

Post on 07-Nov-2015

232 views

Category:

Documents


1 download

DESCRIPTION

Java Programming

TRANSCRIPT

  • *Oracle Academy Java Programming Institute: Day 1Team Project ActivityMatching GameNow that you have learned the basics of Greenfoot and Eclipse, it's time to share your knowledge with others. You will create a matching game that teaches a novice user some key programming concepts you have learned.

    Each team will present their game to the class. Teams will be critiqued by their peers, and assess themselves against two rubrics for the presentation and game.

  • *Oracle Academy Java Programming Institute: Day 1Team Project ActivityIn teams, you will:Review the matching game problem and scenarioReview the rubric Develop a textual storyboardCreate a gameCreate a presentation for the gamePresent to class (Day 2)

  • *Oracle Academy Java Programming Institute: Day 1Matching Game ScenarioProblem:Students need to learn their vocabulary definitions for the Java Programming course.

    Scenario: A matching game where 1-2 players can flip cards and match a vocabulary term to its definition. Once all cards are successfully matched, the player(s) wins the game.

  • *Oracle Academy Java Programming Institute: Day 1Planning DocumentsThe project planning documents are:Visual storyboard to design the game's interfaceTextual storyboard (algorithm) for the processFlowchart of the process

    Do these quickly given the limited time you have to program your game.

  • *Oracle Academy Java Programming Institute: Day 1Visual StoryboardCreate a visual storyboard to illustrate the interface of the animation. It should include:Illustrations of each major scene of the animationText under each illustration that explains what happens in the scene

  • *Oracle Academy Java Programming Institute: Day 1Visual Storyboard (cont.)

    Example

    Java ProgrammingMatching GameImage 1:Front of card. User clicks the a key to turn the card over after its selected.Image 2:Back of card with vocabulary definition automatically appears when a key is pressed. Definition: A variable that is defined in a class. It is used to store information for later use, or to pass information. It can store objects or values.

  • *Oracle Academy Java Programming Institute: Day 1Visual Storyboard (cont.)

    Example (cont.)

    Java ProgrammingMatching GameImage 1:Front of card. User clicks the a key to turn the card over after its selected.Image 2:Back of card with vocabulary term automatically appears when a key is pressed. Vocabulary Term:Defined Variable

  • *Oracle Academy Java Programming Institute: Day 1Visual Storyboard (cont.)

    Example (cont.)

    Vocabulary Term:Defined VariablePlayer can flip two cards. When the vocabulary term card matches the definition card, the two cards are removed from the game, the game makes a victory sound, and the player earns 1 point. Definition: A variable that is defined in a class. It is used to store information for later use, or to pass information. It can store objects or values.1 Point

  • *Oracle Academy Java Programming Institute: Day 1Textual StoryboardCreate a textual storyboard that documents the algorithm for the game. This should include:Acting out the game first as a team.Writing the textual storyboard, which includes: Clear, logical statements that describe what actions the objects perform in the gameControl statements to define when actions take place (in order, together, if/else, etc.)

  • *Oracle Academy Java Programming Institute: Day 1Textual Storyboard (cont.)Example

    Player uses arrows on keyboard to select a card.Player clicks a key on keyboard.Selected card flips over.Player uses arrows on keyboard to select another card.Player clicks b key on keyboard to select the second card.Second selected card flips over.If cards match, they are removed from the game, the player earns 1 point, and a victory sound is played.When all cards are removed from the game, the game ends with a message Game Over and victory sound.

  • *Oracle Academy Java Programming Institute: Day 1FlowchartThe flowchart should map out the game's process to help you document and refine the logic of the game. This includes:The process flow of the animation, including all actions and how each flows logically into the next actionAll condition based decisions (i.e. If and While controls)

  • *Oracle Academy Java Programming Institute: Day 1Flowchart (cont.)Process flow:If the a key is pressed, the selected card is flipped over. If the a key is not pressed, the card is not flipped over.If the a keyis pressedDo this:Flip firstselected cardOtherwise, do this:Do nothingFalseTrueEnd

  • *Oracle Academy Java Programming Institute: Day 1Game SpecificationsThe game you will design will allow the player to select two cards to flip over. If the vocabulary term matches the definition, then the cards are removed from the game. When the player matches all of the cards, the game is over.

    Additionally, the game must: Define 10-15 programming termsUtilize source code in an economical and efficient wayBe creative both in the interface and process flowBe fully functional with no bugs or errors as a result of programming (known errors caused by Greenfoot will not count against your team's assessment)Have a small scope given the time restrictions

  • *Oracle Academy Java Programming Institute: Day 1Presentation SpecificationsYour final project will include a 5-10 minute final presentation which should include:Introduction and high level outline of what you will be presentingProject OverviewDemonstrationHow the project requirements affected your designSummaryQuestions and Answers

    Be sure to sufficiently rehearse your presentation and demonstration.

  • *Oracle Academy Java Programming Institute: Day 2Project Idea #2: JeopardyProject details:Developed in GreenfootJeopardy! Is an American television trivia show with topics such as history, literature, arts, pop culture, science, and so onPlayer's goal is to answer the most questions correctly1-2 players or teamsTeam/player with most points wins

  • *Oracle Academy Java Programming Institute: Day 2Project Idea #2: Jeopardy (cont.)There are three categories of questions. There are five questions in each category, each worth 100 to 500 points. The 100 point questions are the easiest, and the questions get harder as they move up to the 500 point ones.

    Java SyntaxJava ObjectsJava Lingo

  • *Oracle Academy Java Programming Institute: Day 2Project Idea #2: Jeopardy (cont.)Player clicks a cell in the grid to display a question, and enter the answer in the answer field. If the answer is correct, the points are added to the team score. If the answer is wrong, the correct answer is displayed, team loses that amount, and the other team gets their turn.

  • *Oracle Academy Java Programming Institute: Day 2Project Idea #2: Jeopardy (cont.)After all 15 questions have been attempted, the teams can play the Double Jeopardy round.

    In this round, the amounts range from $200 to $1,000--double what they were in the Jeopardy round. Play is the same in this round as it is in the Jeopardy except there are three new categories. In the two player/team game, the team that scores the most points wins.

  • *Oracle Academy Java Programming Institute: Day 2Project Idea #3: Inventory ProgramProject details:Created in Java using EclipseCreate an inventory program for a range of different products (cds, dvds, software, etc.)For each part, build upon the last part so both the old and new requirements are metFour parts to the project

  • *Oracle Academy Java Programming Institute: Day 2Project Idea #3: Inventory Program (cont.)Part 1Choose a product that needs an inventory (music CDs; DVD movies; software; office supplies, etc.).

    Create a Product class that has variables for an item number, the name of the product, the number of units in stock, and the price of each unit. Write getter/accessor and setter/mutator methods for each of the variables. Override the toString() method from the object class that will show a description of each object that includes the variable values.

    Create a Java main class called ProductTester that creates and initializes six Product objects. Display the product number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory (the number of units in stock multiplied by the price of each unit).

  • *Oracle Academy Java Programming Institute: Day 2Project Idea #3: Inventory Program (cont.)Part 2Add a Scanner to ProductTester to ask the user if they would like to add products. Set up a loop that will create new Products. The user whould provides values for the class variables. Display the same information for these products as was in the previous paragraph.

  • *Oracle Academy Java Programming Institute: Day 2Project Idea #3: Inventory Program (cont.)Part 3Modify ProductTester so the application can handle multiple items using an array. Using a for loop, display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product.

    Create a method in the Product class to calculate the value of the entire inventory. In addition, the output in ProductTester should display the value of the entire inventory.

    Implement the Comparable Interface to create another method in the Product class to sort the array items by the name of the product.

  • *Oracle Academy Java Programming Institute: Day 2Project Idea #3: Inventory Program (cont.)Part 4Modify the Inventory Program by creating a subclass of the product class that uses one additional unique feature of the product you chose (for the DVDs subclass, you could use movie title, for example). In the subclass, create a method to calculate the value of the inventory of a product with the same name as the method previously created for the product class. The subclass method should also add a 5% restocking fee to the value of the inventory of that product. Modify the output to display this additional feature you have chosen and the restocking fee.

  • *Oracle Academy Java Programming Institute: Day 1Presentation DevelopmentTechniques to develop your presentation:Review rubric for requirementsSpeculate about what your audience would like to see and knowDiscuss with team how to prepare to share the story of the projectCreate a script or short notesShare the most important informationPractice, rehearse, revise

  • *Oracle Academy Java Programming Institute: Day 1Team GuidelinesTeachers will be grouped into teams. Each person must:Contribute ideas and content to the final projectWork well with other team membersMeet all assigned deadlinesHelp other students in your team produce their best workAsk the teacher if you need help or guidance

  • *Oracle Academy Java Programming Institute: Day 1Define TasksDefine tasks, subtasks, and leader for each task.

  • *Oracle Academy Java Programming Institute: Day 1Define Tasks (cont.)Suggested roles:Storyboard and flowchart manager: manages the team's brainstorming and creation of these products, and ensuring they are completed on-time and with full contributions from all team members.Writer/researcher: writes content for the storyboard and flowchart, as well as content for the animation and presentation. Researches topics as necessary to aid the creation of the animation and inform students on the team.

  • *Oracle Academy Java Programming Institute: Day 1Define Tasks (cont.)Suggested roles (cont.):Programmer: programs the animation.Tester: tests and debugs the animation throughout the development process.Presentation manager: manages the team's development of the final presentation, ensuring that all planning is completed on time, that the presentation is rehearsed and that the script or plan includes contributions from each team member.

  • *Oracle Academy Java Programming Institute: Day 1AssessmentAssessment takes place as follows:Review the presentation and culminating product rubrics before you create your game.When your game and presentation is finalized, ensure both meet the criteria in the rubric.After each team presents, the team will self-assess themselves using the rubric. The class will give verbal feedback.The team will reflect on ways they could have improved their game and presentation.

  • *Oracle Academy Java Programming Institute: Day 1Presentation RubricRubric to assess the presentation:

  • *Oracle Academy Java Programming Institute: Day 1Presentation Rubric (cont.)Rubric to assess the game:

  • *Oracle Academy Java Programming Institute: Day 1Presentation Rubric (cont.)Rubric to assess the Greenfoot game (cont.):

  • *Oracle Academy Java Programming Institute: Day 1Develop Game and PresentationExplore :Java Swing - http://docs.oracle.com/javase/tutorial/uiswing/

    Develop:Solution in Eclipse/GreenfootFinal presentation

    Before you program objects to move, you need to understand their orientation, or sense of direction.Before you program objects to move, you need to understand their orientation, or sense of direction.Before you program objects to move, you need to understand their orientation, or sense of direction.Before you program objects to move, you need to understand their orientation, or sense of direction.Before you program objects to move, you need to understand their orientation, or sense of direction.Before you program objects to move, you need to understand their orientation, or sense of direction.Before you program objects to move, you need to understand their orientation, or sense of direction.Before you program objects to move, you need to understand their orientation, or sense of direction.Flow charts are used by programmers to think out how their code will flow; this is especially useful when handling conditions.

    Flowchart BasicsTriangle This shape indicates a decision pointRectangle This shape indicates a process to be completed; this could be a calculation or execution of a statement.Elongated circle Ends the program

    A second example; this to work through with students. Have the students provide the flowchart for:

    If I see a spider, then I will scream, "YAAHHHHAA!"; otherwise, I will not scream (i.e., do nothing).

    Ask: What is the:Decision pointTrue resultFalse resultBefore you program objects to move, you need to understand their orientation, or sense of direction.Before you program objects to move, you need to understand their orientation, or sense of direction.Before you program objects to move, you need to understand their orientation, or sense of direction.Before you program objects to move, you need to understand their orientation, or sense of direction.Before you program objects to move, you need to understand their orientation, or sense of direction.Before you program objects to move, you need to understand their orientation, or sense of direction.Before you program objects to move, you need to understand their orientation, or sense of direction.Before you program objects to move, you need to understand their orientation, or sense of direction.Before you program objects to move, you need to understand their orientation, or sense of direction.Before you program objects to move, you need to understand their orientation, or sense of direction.Before you program objects to move, you need to understand their orientation, or sense of direction.Before you program objects to move, you need to understand their orientation, or sense of direction.