ballard_lab1.doc

4
Intro to Object-Oriented Programming Chia Chien LAB #1 NAME _____Larry Ballard_____________________________________________________ Assignment #1 (due by the end of this lab class) Show me the completed DEMO exercises Assignment #2 (due at beginning of next lab class) Turn in LAB REPORT for all WRITE exercises (TYPED and properly formatted – see back page) *Forma t Exercise s Notes Project do Confirm Rowan Network username/password Acquire textbook and bring to ALL classes Acquire 2 flash drives and MUST put your name on them Create IOOP directory on your H:\ drive Install BlueJ application onto your computer and/or laptop Copy BlueJ project files (5 th edition ) to H:\ drive & computer do 1.1 – 1.8 Projects must be compiled before objects may be created figures DEMO 1.9 Do the hilltop image ONLY and create 1 shape at a time do 1.10 1.11 – 1.12 Use the 3 lines of code at the top of pg. 11 1.13 – 1.14 house 1.15 Right-click on the class to bring up the pop-up menu 1.16 COMPILE after EACH time code is changed, then execute and TEST 1.17 Add the line of code stated + 6 lines of code to the draw method – Also add 1 line of code to each of the setColor and setBlackAndWhite methods – Don’t forget to test it 1.18 Set the original sun by adding 1 line of code to the draw method using slowMoveVertical 1.19 Create sunset method by copying structure from another method and move slowMoveVertical line of code from draw to sunset Page 1 of 4

Upload: anonymous-wdssc6

Post on 24-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Lab #1

Intro to Object-Oriented Programming Chia Chien

LAB #1

NAME _____Larry Ballard_____________________________________________________

Assignment #1 (due by the end of this lab class)

Show me the completed DEMO exercises

Assignment #2 (due at beginning of next lab class)

Turn in LAB REPORT for all WRITE exercises (TYPED and properly formatted see back page)

*FormatExercisesNotesProject

do Confirm Rowan Network username/password

Acquire textbook and bring to ALL classes

Acquire 2 flash drives and MUST put your name on them

Create IOOP directory on your H:\ drive

Install BlueJ application onto your computer and/or laptop

Copy BlueJ project files (5th edition) to H:\ drive & computer

do1.1 1.8Projects must be compiled before objects may be createdfigures

DEMO1.9Do the hilltop image ONLY and create 1 shape at a time

do1.10

1.11 1.12Use the 3 lines of code at the top of pg. 11

1.13 1.14house

1.15Right-click on the class to bring up the pop-up menu

1.16COMPILE after EACH time code is changed, then execute and TEST

1.17Add the line of code stated + 6 lines of code to the draw method Also add 1 line of code to each of the setColor and setBlackAndWhite methods Dont forget to test it

1.18Set the original sun by adding 1 line of code to the draw method using slowMoveVertical

1.19Create sunset method by copying structure from another method and move slowMoveVertical line of code from draw to sunset

DEMO1.20Declare a new field person where the other field declarations are then create a new person object with new and position the person using MoveVertical and MoveHorizontal within the draw method finally in the sunset method, use makeVisible and slowMoveHorizontal to show the person and make the person walk up to the house

do1.21 1.29Put double quotes around parameters of type Stringlab-classes

WRITE1.30LIST the 8 primitive types with descriptions (Reference App. B)

1.31NOTE: Integers default to int & floating points default to double

1.32ONLY 1 line of code to declare field named name of appropriate type

1.33ONLY the send method header with a String parameter & no return

1.34ONLY the average header with 2 int parameters & an int return value

1.35Is this textbook a class (a generic item) or an object (a specific item)? If a class, name objects. If an object, name its possible class.

1.36HINT: Can a specific item belong to > 1 classification? Give example.

*Format

do complete the exercises and learn the concept, but nothing needs to be turned in

DEMO complete the exercise correctly and show me each result as you complete it DURING lab

WRITE write the exercise # and the answer (including code) in your lab report

CODE complete the coding (compiled and tested) required in your project to turn in

FLASH copy the entire BlueJ project directory with completed CODE exercises onto your flash to turn in

(project should compile without errors and execute correctly)

PRINT print out ALL the .java code files directly from the BlueJ code editor (print 2 pages per sheet)Larry BallardIOOP(Sec. 3) - Lab 19/10/151.30

byte:short:

int:

long:

float:

double:

boolean:

char:

1.31

answers

1.32

answers

1.33

answers

1.34

answers

1.35

answers

1.36

answers

:

:

:

1.9

1.20

FORMAT

FILE NAME LASTNAME_Lab#

BORDERS 1 inch (all sides)

FONT Arial or Times New Roman

FONT SIZE 11 or 12 point

LINES Single-spaced

PARAGRAPH SPACING 0 point (before and after)

HEADER 3 lines, BOLD and right-justified

EXERCISE # BOLD&UNDERLINED, left-justified, and on its own line

ANSWERS next line after exercise #

SPACING Blank line BETWEEN exercises

PRINT 2 pages per sheet

Page 2 of 3