Writing Classes

4.8(4)
studied byStudied by 406 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/26

Last updated 2:00 AM on 11/13/23
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

27 Terms

1
New cards

Class

When a group of statements, such as control structures, are all put together to be referred to this.

2
New cards

Indentations

It needs to be correctly indented for the code to be considered a part of the class.

3
New cards

Variable declarations

are found at the top of the code right after the header.

4
New cards

.java extension

lets the compiler recognize the file as containing java code.

5
New cards

.java file

is called the source code for a program because it defines the program’s actions and functions.

6
New cards

Method

A group of code that performs a specific task.

7
New cards

Driver class

A class that is created to control a larger program

8
New cards

Object class

This class houses the “guts” of the methods that the driver class calls.

9
New cards

Java

is a descendent of the object class in the Java language.

10
New cards

Java language

Every class in Java is a descendent of the object class in the

11
New cards

Header

It’s used to define the function of the method.

12
New cards

Constructor

They set an object's initial values for instance variables.

13
New cards

Parameters

(these are optional) They are data that the method needs to function properly.

14
New cards

instance variables, or fields

Three attributes in order for the code to function correctly.

15
New cards

Visibility

is if the method is public or private.

16
New cards

Return type

specifies the type of data that will be returned from the methods after its commands are executed.

17
New cards

Method name

is the name of the method.

18
New cards

Overloading

writing multiple methods that perform the same task, but require different information, or parameters to to something.

19
New cards

Precondition

A comment that is intended to inform the user more about the condition of the method and guarantees it to be true.

20
New cards

Postcondition

A condition that must always be true just after the execution of a section of code, or after an operation in a formal specification.

21
New cards

Composition

In order for the classes to come together and have the program function properly, they need to work together properly.

22
New cards

Driver and object classes

must be in the same folder on the computer.

23
New cards

Programmer

has to take on the responsibility of deciding which objects to instantiate and to which types and when to use them, and how they are used based on the needs of the class.

24
New cards

Aggregate class

Made up of other data, and instances of other classes.

25
New cards

this

is a keyword used to reference the current calling object and may be used as an object variable.

26
New cards

Static variable

is an attribute that is shared among all instances of a class.

27
New cards

Non-constructor

method that is designed to access or modify a static variable is a static method.

Explore top notes

note
Chains Vocab Pt.2
Updated 1135d ago
0.0(0)
note
The Integumentary System
Updated 1184d ago
0.0(0)
note
2.1a: Research methods
Updated 650d ago
0.0(0)
note
Chp 9: Relationship Maintenance
Updated 1154d ago
0.0(0)
note
CYL TRIMESTRE 1
Updated 857d ago
0.0(0)
note
Civics Unit 3
Updated 14d ago
0.0(0)
note
Chains Vocab Pt.2
Updated 1135d ago
0.0(0)
note
The Integumentary System
Updated 1184d ago
0.0(0)
note
2.1a: Research methods
Updated 650d ago
0.0(0)
note
Chp 9: Relationship Maintenance
Updated 1154d ago
0.0(0)
note
CYL TRIMESTRE 1
Updated 857d ago
0.0(0)
note
Civics Unit 3
Updated 14d ago
0.0(0)

Explore top flashcards

flashcards
H2-5 gebouwen gechiedenis
90
Updated 623d ago
0.0(0)
flashcards
Unit 3: Period 3: 1754 - 1800
52
Updated 1031d ago
0.0(0)
flashcards
cell yourself
44
Updated 664d ago
0.0(0)
flashcards
A&P: Senses
31
Updated 1078d ago
0.0(0)
flashcards
H2-5 gebouwen gechiedenis
90
Updated 623d ago
0.0(0)
flashcards
Unit 3: Period 3: 1754 - 1800
52
Updated 1031d ago
0.0(0)
flashcards
cell yourself
44
Updated 664d ago
0.0(0)
flashcards
A&P: Senses
31
Updated 1078d ago
0.0(0)