Table of Contents
- The purpose of this lab is to get you started with your first tutorial for the course.
- In addition, the lab will introduce you to the following concepts:
- source code
- method call
- As part of the lab, you will see how to get started producing your own game.
Note: if you do not complete this lab on time, you might be dropped from the course. However, do not rely on the instructor to drop you because he may not. You are entirely accountable for failing to drop any course.
Read the Scholastic Honesty Policy and Quest and Lab Integrity policies of the syllabus. Here are some clarifications for this particular lab:
- This is a solo lab that you must complete individually.
- You may get help from others installing the Java compiler and Greenfoot, as long as you actually complete all the steps yourself.
- You may discuss the code with other students for this lab.
- You must type all the code yourself and not copy from another student.
Part of the lab this week is installing the development environment for the course.
- Install Greenfoot and Java on a computer system.
- Create a text file named
install.txt and briefly describe where you got the programs to install, the type of computer system you installed the programs on, and the steps you went through. Make sure you include the version number of the software you installed.
- In the
install.txt file, describe how you tested the installation.
Note that if you get stuck installing Greenfoot and Java, bring your problems or questions to class, visit the STEM Center or visit the instructor during office hours.
- Make sure you have completed the exercises from lesson 1.
- Register for CodeLab (Free) and complete both the CODELAB WARMUP and Chapter 1 exercises. These are review exercises and you have all the information needed to complete them. If you have questions, please contact the instructor.
- Scan the textbook chapter 2 to get an overview of the material.
It is important to have access to the book. If you have ordered the book but have not received it yet, then you can read it at the CTC. Make sure you are using the second edition of the textbook and not the first.
If you do not have the textbook yet, you may use the first edition chapter 2 for this lab only. Be aware that the
move() command requires a number in the parenthesis like:
move(2);. The first edition had a different
move() command without a value in the parenthesis. In addition, you must use
isAtEdge() instead of
atWorldEdge(). Also, the number of sections is different.
- Complete the in-chapter exercises 2.1 through 2.18 that are listed throughout chapter 2.
You can download the starting files from: Book scenarios.
- Follow the exercise steps exactly and read the textbook as you progress through the chapter to enhance your understanding.
For those exercises steps that have a text answer, open the Scenario Information (Scenario > Scenario Information) and type the exercise number and answer after the existing Scenario Information. For example, here are my answers to the first few exercises:
Exercises with Text Answers
2.1: Nothing happens.
2.3: Number of pixels to move.
2.4: All crabs move right.
2.5: move(-5); will move backwards
(more answers needed...)
- Add the following to the top of the Scenario Information with the "VERSION or DATE" and "AUTHORS" fields filled in:
PROJECT TITLE: Lab 1
PURPOSE OF PROJECT: Book tutorial chapter 2
VERSION or DATE: 1.0 (The date completed)
AUTHORS: Your name here
- When completed, upload all the files in the scenario to Canvas as explained in the section of this document: Deliverables.
Be prepared to answer questions like the following after completing this lab:
- True or false: to create action in a scenario we must write source code.
- We place commands for the Crab in the method named ________.
- To move forward 5 pixels write the command ________.
- To turn counterclockwise 3 degrees write the command ________.
- The name of the method described by the following signature is ________.
public void turn(int amount)
- True or false: the above method returns a value.
- The number of parameters defined for the above method signature is ________.
- To call the above method, type the code ________.
- The above method is defined in the class ________.
- none of these
- When you forget a semicolon at the end of a line you usually see the message ________.
- To make a decision we write a command known as a(n)________.
- method call
- method signature
- We execute the commands in an if-statement when the condition tests to ________.
The instructor will evaluate your lab using the following criteria. Thus you should check your lab against these criteria to maximize your XP.
Lesson Exercises (from Class)
- 2: All lesson exercises attempted and turned in
- 1: Some lesson exercises not completed and turned in or other problems found
- 0: No lesson exercises turned in or wrong folder name
- 1 point for describing your Greenfoot and Java installation in install.txt.
- 1 point for describing how you tested the installation.
Tutorial Lab (Textbook)
- 4: Demonstrates mastery of the lab exercise:
- Applies concepts from the textbook appropriately
- Follows the steps exactly
- Exercises perform correctly
- 3: Has all the major functionality expected:
- Implements many techniques from the textbook
- May deviate from the specified steps in some way
- Implementation seems more complicated than necessary.
- 2: Has much of the functionality expected:
- Demonstrates some techniques from the textbook
- Deviates from the specified steps in some way
- Implementation seems excessively complicated.
- 1: Serious functional problems but shows some effort and understanding:
- Follows at least 1/2 of the of the specified steps
- Has a major error (detected by the browser) or many minor errors
- Demonstrates few techniques from the lesson
- 0: Not turned in or wrong folder name
Number completed correctly / number exercises * 8 and rounded up to the nearest integer.
Maximum XP: 16
Students submit some homework as they work on it like CodeLab. However, students must submit other work to Canvas as described below.
- On your computer, create a folder for the lesson exercises named "lesson" (no extra characters) and place all the exercise files from Lesson 1 into this folder including:
- Create a second folder named "tutorial" (no extra characters) and place the entire tutuorial scenario folder from chapter 2 of the textbook into this folder. There should be only one scenario which is the culmination of all the tutorial exercises from the textbook.
The README.TXT file from the scenario is included as part of the scenario.
- Place the
install.txt file from this lab in the tutorial folder.
- Create a zip file for each folder, and submit the zip files to the Lab 1 slot of Canvas.
- In addition, verify you have completed the CodeLab exercises.
Please do not add any extra characters to the above folder names. Also, do not put any spaces or special characters like #, : or $ in zip file or folder names. Your crafted code must work as submitted. Remember to test and double check your files before and after submitting them. If you make a mistake, you can resubmit up to the deadline but must resubmit all your files. For information on resubmitting see How do I change an assignment in Canvas?
| Room Policies
Last Updated: August 16 2017 @19:07:12