Shared Flashcard Set

Details

Chapter 5
Java syntax and style
26
Computer Science
12th Grade
09/18/2008

Additional Computer Science Flashcards

 


 

Cards

Term
syntax (english deffinition)
Definition

sentence structure

spacing

grammer

spacing

caps

Term
computer syntax
Definition
set of rules for writng code so that the compiler can translate it.
Term
how do you seperate a comment from the rest of the code?
Definition

/*    */

 

or after // BUT IT MUST BE ON A SINGLE LINE

-no closing slashes

Term
a second use for comments (besides chatting with people)
Definition
makes a programmer skip that particular stretch of code.
Term
A ____ must always precede a constructor/method/field to be processed by javadoc
Definition
documentation comment
Term
Java reserved words
Definition
that list of lots of techy sounding words
Term
reserved words must be typed in _______
Definition
lowercase letters
Term
things to remember when naming your method/program
Definition

can be uppper or lower case

 

two or more word names everything but the first word needs to be capitalized

 

names can't start w/ a digit

 

names should be self-explanitory

Term
classes start w/ ______
Definition

capitalized letters

 

Term
methods and variables start w/
Definition
______ lower case letters
Term
classes and objects sound like
Definition
nouns
Term
method names sound like
Definition
verbs
Term
extra white space
Definition

too many spaces/tabs

 

(even if you have a hundred, the program only reads it as one seperation)

Term

blank lines, spaceing, indenting are all......

Definition
compiler's style
Term

redundancy

Definition
virt languages have none of it.
Term
declarations
Definition

describe objects

 

terminated w/ semicolon

Term

control statements

Definition
describe actions
Term
statemnts can be grouped by.....
Definition
grouping into blocks w/ braces.
Term
class name
Definition

(example: class hello world, moving disk)

 

ALWAYS A NOUN.

 

ALWAYS BEGIN WITH A CAPITAL LETTER

Term
int, double, char, boolean
Definition
primitive types
Term
literal value
Definition
Term
variables
Definition

must be declared before it can be used:

 

int count;

 double    x, y; <<<<names

Type>>>J Button   go;

Walker  amy;

String  firstName

Term
floating division
Definition

7/5 = 1.4

Term
what is a class?
Definition

like a bicycle

 

in the class there ae lots of different

 

like a normal class

 

blue print of prototype

 

what is an object?

blue print or prototype from which objects are created

date incapsulation = hiding internal state and requiring all interactin to be formed through and objects' methods.

 

fields and methods : can you identify fields in the bicycle class?

 nouns =fields = speed kings

 

methods: verbschange cadence change gear

Supporting users have an ad free experience!