AP Computer Science Chapter 4

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

In structured programming, program flow is strictly controlled with how many entrances and exits?

1

What is the output of System.out.println(Math.sqrt(100))

10

How many Color constants are built into java?

13

What does awt stand for?

Abstract Windows Tools

What are the 4 stages of program design?

Cryptic Programming, Unstructured Spaghetti-Programming,Structured Programming,OOP

Which class has methods that use more parameters, math or graphics?

Graphics

What is the difference between C++ and java with regards to OOP?

Java requires it, C++ does not

What libraries must be imported in order to use the graphics class?

Java.awt Java.applet

Which method is not found in an applet?

Math

In structured programming, program statements with a common purpose were grouped together in special..

Modules

Is GOTO used in structured programming?

No

What does OOP stand for?

Object Oriented Programming

What is Encapsulation?

The object encapsulates both data and the logizal procedures required to manipulate the data.

How is calling a method of the math class different from calling a method in the graphics class?

They don't follow the same pattern

In OOP, what are attributes used for?

They store program data

What controls the execution sequence in an applet?

Web browser

Modules that perform a related set of functions are grouped together in a special type of container. What is the container called?

class

What 4 things can parameters be?

constants,variables,expressions,methods

Structured Programming greatly improved the... of programs

creation,debugging,and updating

What 2 things do classes contain?

data,methods

What is the difference between drawOval and Filloval

drawOval draws the circle, while fillOval fills it.

What graphics method is similar to system.out.println, but is used with graphics output

g.drawString

Print the java command to change the graphics color to orange

g.setcolor(Color.orange)

What are 2 types of class interaction?

inheritance, composition

What do the 5th and 6th parameters of drawArc specify?

int start,int decrees

What do the 4 parameters of the drawRect method of the Graphics class specify?

int x,int y, int width, int height

What do the 4 parameters of the drawLine method of the Graphics class specify?

int x,int y, int x2, int y2

What do the 4 parameters of the drawOval method of the graphics class specify?

int x,int y,int width,int height

When you use parameters incorrectly it may not always be apparent that the program has some --- error

logic

How do you create a circle with the drawOval and fillOval methods?

make the width and height the same

How do you create a square with the drawRect and fillRect methods

make the width and the height the same

What does the word polymorphism mean?

many forms

What does math signify?

math class

What does sqrt signify?

method identifier

What is the difference between drawRect and fillRect

one draws, and one fills

What does 100 signify?

parameter

What is an arc

part of a circle

what 2 java methods have you already learned about?

print,println

In OOP, what are methods used for?

they perform some actions on the information

What is a parameter used for?

to provide pessary info to a method


Kaugnay na mga set ng pag-aaral

Personal Finance Health and Life Insurance

View Set

Chapter 6: Osseous tissue and Bone structure

View Set

Long-Term Care Insurance (LTC) - Section 17 - Quiz

View Set

Earth Science Final Review 2 - Plate Tectonics

View Set

4.5-4.6: Free Fall: How Fast & How Far

View Set