Chapter 4 Worksheet - Quinton Porter
Chapter 4 Worksheet - Quinton Porter
Worksheet CH. 4
Name: Quinton Porter
Date: 10/20/2014
Period: 3
Instructions:
1- Read Chapter 4 of your text book.
2- Fill out this work sheet
3- Use this work sheet for test on chapter 4.
4- Worksheet is due on the day of the test as an assignment grade.
1.
2.
3.
Java.lang
5.
With abbreviations
6.
What are the names for the information that is passed to a method?
Parameters or arguments
7.
value returned
3
7
8
3
8
9
3
7
4
200
-200
35
45565
3.14
2.71
Programmers made up their own coding ways that no one else understood
Define polymorphism:
10 Define inheritance:
Reusing old code
11 Define attributes:
2
Store data
12 Define methods:
Act on the data
13 Define arguments:
Variables that are acted upon
14 Define parameter:
An argument
15 Define Object:
A noun that simulates a real life object
Objects
19. Which Math class features alters real numbers with fractions to whole numbers?
Round, Ceil, Floor
20. Which Math class features do not use any parameters or arguments?
16
sqrt(x) x is 64.
floor(x) x is 5.5
ceil(x) x is 6.5
round(x) x is 2.3
PI
E
abs(x) x is -25
8
5
7
2
3.14
2.71
25
For questions 37-39, identify the outputs of x, and y, in the following Math Class Methods.
37.
38.
39.
Max(x,y) x is 5, y is 10
Min(x,y) x is 3, y is 15
pow(x.y) x is 2, y is 3
10
3
8
40. List the comments that are required for each class in your labs:
__File Name_________________________
____Lab Description_______________________
____Name_______________________
_____Period______________________
_____Date______________________
41. You have been assigned to turn in a selfie report and its number is 15, what would you name the file.
Selfie 15 Quinton Porter
42. Your are getting ready to print a lab to turn in, what will happen if the 5 comments are not included in the
lab print out.
7