Portfolio Activity the review of his laboratory tests lightheaded and dizzy while making breakfast patients and two possible med…

FIND A SOLUTION AT Academic Writers Bay

Activity R7-1 *** Portfolio Activity ***
The following activities are to be recorded in you’re the Portfolio word document under the
heading Activity R7-1.
1. Declare and initialise a String array called food with the names of three different types of
food that you may use in your game. You may wish to use the food you already use and/or
create new food names.
2. Using a while loop, write the code that will play one of your games’ sound files 7 times.
3. Consider the following code:
int x = 25;
int i = 1;
while (i < 5)
x = x – 5;
i += 1;
What is the value of x after this code has executed?
What is the value of i after this code has executed?
**** Activity R7-7 Portfolio Activity ***
This activity will update your existing game you created for the Practical skills assessment. Each
Implementation, when it is completed, should be saved as a gfar in your portfolio folder.
For the next few activities you will be using code to add new Actor objects to your scene. Remove
all the code within the prepare method so that no objects are added to the scene. You will be
starting with an empty prepare method. If you called your prepare method something different just
remove all the code from that method.
Save your program in the Portfolio folder as ActivityR7-7_rmason10.gfar. Replace rmason10 with
your username for MySCU.
**** Activity R7-8 Portfolio Activity ***
This activity will update your existing game you created for the Practical skills assessment. Each
Implementation, when it is completed, should be saved as a gfar in your portfolio folder.
In your games’ world class that you created (not the actual World class):
1. In the prepare method, write a line of code to create a new Player object ready to be
added to the world.
2. Also, in the prepare method, add code to add the new player object to the middle of the
world.
Save your program in the Portfolio folder as ActivityR7-8_rmason10.gfar. Replace rmason10 with
your username for MySCU.
**** Activity R7-9 Portfolio Activity ***
This activity will update your existing game you created for the Practical skills assessment.
Each Implementation, when it is completed, should be saved as a gfar in your portfolio folder.
1. At the top of your world class, add code to hold an array of 3 Enemy objects in the world
(do not add code to add the enemy objects to the world just yet as this will be done in the
next activity)
2. If you do not have a score for your game add code to record and display a score. You can
implement the score for your game by referring to Activities 6-15 through to 6-19 from last
week. The final “Bonus” activity in Module 11 will assume you have implemented code
similar to this. The “Bonus” activity will display a game over screen.
3. Extra: Create another class called scorePanel. This will represent a scoring panel that sits
behind your actual game score. You may choose an appropriate image to use. Depending
on your Image you may need to scale It larger or smaller. You can experiment by using
getImage(), scale(x,y); where x and y are integer values;
Save your program in the Portfolio folder as ActivityR7-9_rmason10.gfar. Replace rmason10 with
your username for MySCU.
CSC71001 Module 7 – Page 18
**** Activity R7-10 Portfolio Activity ***
This activity will update your existing game you created for the Practical skills assessment. Each
Implementation, when it is completed, should be saved as a gfar in your portfolio folder.
In the method you will use to setup the world, use a ‘ while loop’ to:
1. Add the array of Enemy objects to the world in random locations
2. Add code to create and add a random number of between 5 and 10 Food objects to the
world in random locations.
Make sure to test your game by resetting it and checking to make sure that all the objects, other
than the Player class, appear at random locations in the world.
Save your program in the Portfolio as ActivityR7-10_rmason10.gfar. Replace rmason10 with your
username for MySCU.
**** Activity R8-1 Portfolio Activity ***
This activity will update your existing game you created for the Practical skills assessment. Each
Implementation, when it is completed, should be saved as a gfar in your portfolio folder.
In your games’ world class that you created (not the actual World class) create a constant variable
called “enemy array” and set its value to 3. Make sure to use the correct naming conventions.
Replace the while loops in your game to for loops to add the array of enemy objects to the world in
random locations. In this code you will implement the constant variable you declared earlier.
Make sure to test your game.
Save your program in the Portfolio as ActivityR8-1_rmason10.gfar. Replace rmason10 with your
username for MySCU.
**** Activity R8-2 Portfolio Activity ***
This activity will update your existing game you created for the Practical skills assessment. Each
Implementation, when it is completed, should be saved as a gfar in your portfolio folder.
In your food class or if you have more than 1, choose only 1:
1. Declare and initialise a GreenfootImage instance variable that will hold a new Food image.
This image should have the same theme as your Food class (Look at the video on using
other images and see the ***Note at the end of this activity)
2. Create a default constructor that takes no parameters and does not initialise any fields eg:
public Food() //no code goes in here 
3. Create a second constructor that takes 1 integer parameter. This constructor will set the
image of the food to either the default image you use or the new food image. 1 will mean the
default image is called and 2 will mean that the new image is called.
In your World class, within your prepare method (you may wish to comment out previous loops);
4. Using at least one loop, create a squadron of food objects in the shape of one of your initials
that uses the second constructor. The argument you will pass to the second constructor’s
parameter will be a random number of either 1 or 2. For example, instead of using new
Food() I might use new Food(1) or new Food(2) for testing purposes (this is not random, you
will have to add random functionality to your code).
5. In addition to the above activity, using two nested for loops (a loop within another loop),
create a border around your scene of your initial. You will use one nested for loop to create
the top and the bottom border and the other nested for loop to create the left and right border.
Optional extras:
***Note: Getting images:
A good place to get sprites to use for your Greenfoot projects is Google images – using the search
“sprites png” or “sprite sheet png”. Of course, you need to be careful that you have permission to
use the images, but these are great to use. You can use the free online image editor at
www.pixlr.com to crop them to size.
Make sure to test your game. Save your program in the Portfolio as ActivityR8-2_rmason10.gfar.
Replace rmason10 with your username for MySCU.
Activity R9-6 ***** PORTFOLIO ACTIVITY *****
This activity will update your existing game you created for the Practical skills assessment.
Each Implementation, when it is completed, should be saved as a gfar in your portfolio folder.
Using your own scenario, implement code that demonstrates a for-each loop. Some ideas for
using a for-each loop might include one of the following:
Once a certain score is reached:
• adjust the speed of each enemy or food object
• reset the position of each object to random locations on the screen
• make each enemy turn towards the player
• change the image of each enemy or food
While the game is running:
• swap images like a star twinkling or some other form of animation
• make all enemy or food objects randomly turn in the same direction
On keypress
• change the state (spin, move, or turn) of each enemy or food object.
• change the image of each enemy or food object
These are just a few ideas. Feel free to implement your own idea. If you are unsure, please ask
your tutor.
Save your program in the Portfolio as ActivityR9-6_rmason10.gfar. Replace rmason10 with your
username for MySCU.
Activity R9-7 ***** PORTFOLIO ACTIVITY *****
In your portfolio document, under the heading “Module 9-7: For-Each Loop”, write a brief
description of your game and explain clearly how your game demonstrates a for-each loop. Do
not post code into this section. You must also explain where in your code you implemented the
for-each loop.
Activity R10-4***** PORTFOLIO ACTIVITY *****
This activity will update your existing game you created for the Practical skills assessment. Each
implementation, when it is completed, should be saved as a gfar in your portfolio folder.
1. In your Food class; If you do not have a variable to store speed at this stage you should
implement one now. Modify your Food class code so that an instance variable stores the
speed a Food object.
2. In your Food class; If you do not have a variable to store points at this stage, you should
implement one now. Modify your Food class code so that an instance variable stores the
points that this Food object is worth.
3. If you do not have one already. add a getPoints() method to your Food class that gets the
points that this Food object is worth.
4. If you do not have one already. add a getSpeed() method to your Food class that gets the
speed value of a Food object.
5. Modify your Player code so it adds the Food object’s points to the score each time, by using
this new getPoints() method of the Food. (note: you may have implemented this already)
Save your program in the Portfolio as ActivityR10-4_rmason10.gfar. Replace rmason10 with your
username for MySCU.
CSC71001 Module 10 – Page 12
Activity R10-5 ***** PORTFOLIO ACTIVITY *****
This activity will update your existing game you created for the Practical skills assessment. Each
implementation, when it is completed, should be saved as a gfar in your portfolio folder.
You should already have 2 constructors in your Food class. One constructor that takes no
parameters and another constructor that takes an Integer as a parameter. If you do not have these
constructors, you should refer to the Module 8 Portfolio activities.
We will now create a third constructor. This constructor will take one String parameter. The three
string values we will pass to this constructor are “good”, “bad” and “normal”.
1. Write code in your Food class to create this constructor.
2. Inside the third constructor write an if statement to check to see what value has been passed
to the constructor. The IF statement should check if the value is “good”, “bad” or “normal”.
If the String is “good”, this constructor should set the speed to 5, set the image to an
appropriate food Image, and set the points to 50. If the String is “bad” this constructor
should set the speed to 2, set the image to a bad food Image, and set the points to -100. If
the String is “normal” this constructor should set the speed to 3 and set the points to 25.
Save your program in the Portfolio as ActivityR10-5_rmason10.gfar. Replace rmason10 with your
username for MySCU.
Activity R10-6 ***** PORTFOLIO ACTIVITY *****
This activity will update your existing game you created for the Practical skills assessment. Each
implementation, when it is completed, should be saved as a gfar in your portfolio folder.
Add code to the act method of your World class to keep adding objects to the world. You can
choose how often you would like the objects to be added to the World. The code will need to
implement the third constructor. You will need to implement an IF statement to determine which
Food object will be added to the world at random.
Save your program in the Portfolio as ActivityR10-6_rmason10.gfar. Replace rmason10 with your
username for MySCU.
Activity R10-7 ***** PORTFOLIO ACTIVITY *****
In your portfolio document, under the heading “Module 10: Overloading Constructors”, write a
description of your scenario and explain how this demonstrates overloading constructor methods
for your scenario.

Order from Academic Writers Bay
Best Custom Essay Writing Services

QUALITY: 100% ORIGINAL PAPERNO PLAGIARISM – CUSTOM PAPER