1 ra row your boatprepare a world with a boat a person

Assignment Help JAVA Programming
Reference no: EM13347502

1. Ra Row Your Boat

Prepare a world with a boat, a person sitting in the boat, an island, and a pier located 25 meters from the island. In the world shown below, Ra (Egypt) is sitting in a rowboat (Vehicles). Create a method to make the Ra object row the boat 25 meters from the island to a pier (Beach). One suggested way to do this would be to create the methods: rowLeft androwRight(to control the arms' motions), controlTorsoAndHead(to control back and head motions), and startRowand stopRow(to put Ra's body in and out of the rowing position).

2. Robot Preparing for Competition

In this project, your goal is to create a motion controller for a robot (Ranger from Scifi). You will create specific methods that allow the robot to perform warm-up actions for its upcoming competition.

Create the following methods to help the robot warm up for it's competition:

armSwing: the robot swings it's arms back and forth across the front of it's body

headShake: the robot's visor flips back so it's head is showing. Then it rocks it's

head right, left, back, forth. Then rotates its head left and right.

jumpUpAndDown: the robot jumps up and down

Your own method: Think of one other action for the robot and make a method for it.

Create the following keyboard controls:

When the "A" key is pressed, the robot swings its arms.
When the "H" key is pressed, the robot shakes its head.
When the "J" key is pressed, the robot jumps up and down.

3. Help the Snowman get Home

Create a game where the goal is to move the snowman through a forest to get him home to his igloo. The hazard in this game is that if the snowman gets too close to a tree, he moves back 10 meters. Add the snowman (People), a snowboard (skateboard fromSkatepark - change the isShowing for the wheels to false), an igloo (Buildings), and eight pineTrees (Nature). Set the vehicle for the snowman to be the skateboard.

Create an event so that the skateboard can be controlled by game player, by typing the arrow keys.

Create a method for the skateboard named checkForCollisionWithTrees. If the skateboard's distance to the pine tree is less than 3.75 meters, then move the skateboard back 10 meters. In this method, you will need to check each tree in the scene. When you have the If/Else working for one tree, then copy it for each of the other trees.

To have Alice constantly check for collisions with the trees, create a When the World Starts event. Then change it to While the World is Running (a right click on the event pops up a menu so it can be changed). In the during section of the While the World is Running event, call the checkForCollisionWithTrees.

In order to check whether the player has won the game, create a method named checkIfHomefor the skateboard. If the skateboard gets close to the igloo, display a 3D text object that proclaims "I'm Home!" To make the 3D text flash, add a loop that repeatedly sets the 3D text isShowing property to false and then true.

4. Drinking Parrot

A small toy popular with children is a drinking parrot. The parrot is positioned in front of a container of water and its body given a push. Because of the counterbalance of weights on either end of its body, the parrot repeatedly lowers its head into the water. Create a simulation of the drinking parrot (Objects). Use an infinite Loop statement to make the parrot drink.

Hint: We used the blender object (Kitchen gallery), pushed the base into the ground, deleted the lid, and changed the color of the blender to blue to simulate a bucket of water.

5. Why Did the Chicken Cross the Road?

A popular child's riddle is, "Why did the chicken cross the road?" Of course, there are many answers. In this project, the chicken (Animals) has a real sweet-tooth and crosses the road to eat the gumdrops (Kitchen/Food) along the way.

Write a game animation where the player guides the chicken across the road to get to the gumdrops. Cars and other vehicles should move in both directions as the chicken tries to cross to where the gumdrops are located. Use arrow keys to make the chicken jump left, right, forward, and back. Use the space bar to have the chicken peck at the gumdrop. When the chicken is close enough to the gumdrop and pecks, the gumdrop should disappear.

A recursive method is used to control the play of the game. If the chicken gets hit by a vehicle, the game is over (squish!). The game continues as long as the chicken has not managed to peck all the gumdrops and has not yet been squished by a vehicle. If the chicken manages to cross the road and peck at all the gumdrops along the way, the player wins the game. Signal the player's success by making 3D text "You Win" appear or by playing some triumphant sound.

6. Frog Crossing the Pool

Add a rectangle (Shapes) to a new world and change its color to blue. This will serve as a swimming pool. Add seven circles (Shapes) to the world-five yellow along the long side of the pool (each one meter apart), one green at the nearest side, and one red at the far edge. The yellow circles are lily pads that float back and forth across the pool. Add a frog, and place it on the green circle. The goal is to make the frog jump from lily pad to lily pad until it gets all the way across the pool. If the frog lands on the water (not on a lily pad), the frog sinks into the pool and the game is over. If the frog jumps all the way across the pool and lands on the red circle at the far edge, the player wins.

Your program must place the five yellow circles in a list. Write a method that uses an infinite loop to repeatedly move each of the five yellow circles in the list across the pool and back at different speeds. (The easiest way to do this is to pass a random number to the method to specify the duration for the circle to move across the pool.) Create event handling methods that have the frog jump forward 1 meter if the player presses the key, move left if the player presses the key, and move right if the player presses the key. Connect each event handling method to an event.

7. Record and Play a Song

The goal of this project is to allow users to record their own song and play it back. This project is an extension of project 5, from Chapter 5. If you already created the AlicePiano project, reuse it for this project. Otherwise, please refer back to project 5, Ch. 5, and create the project, as described. To the AlicePiano world created in Ch. 5 project 5, add four control "buttons." These buttons can be created using different shapes and 3D text, as shown in the screen capture below.

The four buttons will be used to:
• Start recording-start recording a song
• Stop recording-stop recording this song
• Play recording-play the latest recorded song
• Clear recording-erase the latest recorded song

To record a song, the user first clicks the Rec button and then clicks on the piano keys to create a sequence of notes. As the user clicks each note, the note is played (to give feedback to the user) and is also recorded. To record the notes, create a world-level list named newSong. Initially, the newSonglist is empty, but during the recording process notes are added to the end of the list. To stop the recording, the user clicks the StopRecbutton.

Reference no: EM13347502

Questions Cloud

Developing a balanced scorecard explore the need for : developing a balanced scorecard explore the need for organisations to calculate and manage performance against
1 - utilizing the rat stereotaxic atlas in the course : 1 - utilizing the rat stereotaxic atlas in the course materials devise a surgical plan for implanting a michigan type
You will write functionsbull bnull basisatolbull brange : you will write functionsbull bnull basisatolbull brange basisatolthe function null basis takes a matrix a as input and
Exercises1make a program that will graph the following : exercises1.make a program that will graph the following parabolas where x ranges from -10 to 10 in increments of 0.1.
1 ra row your boatprepare a world with a boat a person : 1. ra row your boatprepare a world with a boat a person sitting in the boat an island and a pier located 25 meters from
Part onemultiple choices1 it is a concept where goods are : part onemultiple choices1. it is a concept where goods are produced without taking into consideration the choices or
The cost of capital for a firm can differ from the cost of : the cost of capital for a firm can differ from the cost of capital for each of its businesses. when a firm has multiple
Question ron the realtor is offered a job directly out of : question ron the realtor is offered a job directly out of real-estate school. he has a selection as to which way he
Gather data on each of the variables and then based on a : gather data on each of the variables and then based on a quantitative analysis narrow your list down to two

Reviews

Write a Review

JAVA Programming Questions & Answers

  Write a program that creates an enumeration representing

Sherri rolls a 3 and decides to continue. She then chooses to roll two more times (6, 1). Because she rolled a 1, Sherri's turn ends and she earns 0 points.

  Java class to accept a user-s hourly rate of pay

Write a class that accepts a user's hourly rate of pay and the number of hours worked. Display the user's gross pay, the withholding tax (15% of gross pay), and the net pay (gross pay - withholding).

  Explain the legal doctrine benefits balancing

Explain the legal doctrine "Benefits Balancing" as it pertains to applying the reasonable standard of care doctrine in the medical fields. Does a defense that the majority of physicians normally do not give a particular diagnostic test in the normal ..

  Write function in javascript to compute person-s gross pay

Write the function using JavaScript syntax to compute a person's gross pay for a week. The function should receive the number of hours worked and the rate of pay per hour.

  Write a java program that reads a five-line address

Write a Java program that reads a five-line address from an input file and produces an output file with the address repeated 50 times in three columns.

  Vehicle in vehicle.java

Create a class called Vehicle in Vehicle.java with instance variables make (such as Ford, GM, Chrysler, Toyota, or Honda), year, and horsepower (200, 300, and 400). Add the necessary constructor and set and get methods.

  Develop a queue class

Print-out of the text file that contains your restaurant information and develop a Queue class. Hint: Check out the sample Queue java source files included with this assignment. Declare a class Party to hold one party.

  What is overloading and what is overriding

What is overloading and what is overriding? Wrtie JAVA code code to explain it.

  Graphical application for computing statistics

Write a graphical application for computing statistics of a data set. Supply a text field and button for adding floating-point values, and display the current minimum, maximum, and average in a label.

  The burn and distance traveled

The Burn and distance traveled and the "meters to go" should appear on two lines as shown in the sample output. Note that this print should be done within the while loop.

  Give an example of an exception

A. Give an example of an exception that could be generated outside your code but caught within your code

  Develop view for order number and order total in file

Develop a view named OrdTot. It comprises of order number and order total for each order currently on file. Order total is the sum of number ordered.

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