D.3 Program Development

studied byStudied by 2 people
0.0(0)
Get a hint
Hint

Identifier

1 / 30

31 Terms

1

Identifier

  • a named pointer that explicitly identifies an object, class, method, or variable.

  • It allows programmers to refer to the item from other places in the program.

  • Rules state: the first character cannot be a number. No keywords, limits, or spaces

New cards
2

Primitive

the most basic data types valuable within the java language

  • They serve as the building blocks of data manipulation in Java

  • Have only one purpose, that of to contain pure, simple values of a particular kind.

  • Boolean

  • Byte

  • Char

  • Short

  • Long

  • Int

  • Float

  • Double

New cards
3

Byte

  • 8-bit signed two’s complement integer

  • Min value is -128

  • Max value is inclusive 127

  • Default is 0

  • Used to save space in large arrays in the place of integers

    • Four times smaller than an integer

New cards
4

Integer

  • 32 bit signed two’s complement integer

  • Min value is -2,147,483,648

  • Max value is 2,147,483,648 inclusive

  • Default data type for integral values unless there is a memory concern

  • Default value is 0

New cards
5

Long

  • 64- bit signed two’s complement integer

  • Min value is -9,223,372,036,854,775,808 (quintillion)

  • Max value is 9,223,372,036,854,775,808 (quintillion)

  • Used when a wider range than int is needed

  • Default value is 0L

New cards
6

Double

  • A double precision 640 bit IEEE 754 floating point

  • Used as the default data type for decimal values

  • Should never be used for precise values such as currency

  • Default is 0.0d

New cards
7

Boolean

  • A data type that represents one bit of information

  • Only true or false

  • Used for simple flags that track true / false codnitions

  • Default value is false

New cards
8

Char

  • A single 16-bit unicode character

    • Minimum value is ‘\u0000’ aka 0

    • Maximum value is ‘\uffff’ aka 65,353 inclusive

    • Used to store any type of character.

New cards
9

Variable

  • provides a named storage location for a value that a program can manipulate.

    • Must be declared and can only contain data of a particular type.

New cards
10

Instance Variable

Non-static variables that are declared in a class outside any method, constructor, or block.

  • They are declared in classes and are created when an object of that class is created. Destroyed when that object is destroyed.

  • Access modifiers can be used for them.

  • The default access modifier of the class will be used if none are specified.

New cards
11

Parameter variables

  • Parameters allow us to pass information or instructions into functions and procedures.

  • Parameters are the names of the information that we want to use in a function or procedure.

  • The values passed in are called arguments.

New cards
12

Local variables

  • These variables are created when the block is entered or the function is entered or the function is called, and destroyed after exiting from the block or when the call returns from the function.

  • The scope of these variables exists only within the block in which the variable is declared. They can only be accessed within that block.

New cards
13

Method

  • a set code which is referred to by name and can be called at any point by using its name.

    • Can be described as a subprogram that acts on data and sometimes returns a value.

    • Each method has their own name (identifier)

New cards
14

Accessor

  • Accessor -  a type of method used in java OOP that returns the value of a private instance (class) variable.

    • Getter method

New cards
15

Mutator

  • Mutator - a mutator method is used to control changes to an encapsulated instance (class) variable / state.

    • Setter method

New cards
16

Constructor

  • Constructor - a method that is an instance method (defined inside a class) that is invoked when an object of that class is created (by using the new keyword).

    • Object creation rule: when an object is created, one of the constructor method in the class must be invoked (to initialize the instance variables in the object).

New cards
17

Method vs Constructor

knowt flashcard image
New cards
18

Signature

  • a part of the method declaration. The combination of the method name and the parameter list.

    • The reason for the emphasis on just the method name and parameter list is because of overloading methods that have the same name but accept different parameters.

New cards
19

Return value

  • a reserved keyword in java. CANNOT be used as an identifier.

    • Used to exit from a method with or without a value.

    • Can be used in methods in two ways

      • Methods returning a value: for methods that define a return type, return statement must be immediately followed by a return value.

      • Methods not returning a value: for methods that don’t return a value, return statement can be skipped.

New cards
20

Procedures versus functions

  • Procedures: do not return any value (void).

  • Functions: return a value

  • No method can return more than one value at a time in Java.

New cards
21

Access modifiers

  • Determine whether other classes can use a particular field or invoke a particular method.

  • A class may be declared with the modifier public, in which case that class is visible to all classes everywhere.

  • If a class has no modifier, it reverts to default condition and is visible only within its own package.

  • Three type of access modifiers:

    • Public

    • Protected

    • Private

New cards
22

Public

  • A class, method, field, or constructor that is declared public can be accessed from any other class.

  • Due to class inheritance, all public methods and variables of a class are inherited by its subclasses.

New cards
23

Private

  • Methods, variables, and constructors that are private can only be accessed within their declared class.

  • The most restrictive access level.

  • Classes cannot be private, but methods and variables in them can be.

  • Variables that are private can be accessed outside the class if the public getter methods are present in the class.

  • Using the private is the main way that an object encapsulates itself and participates in data hiding.

New cards
24

Protected

  • Can only be accessed by the superclasses’ subclasses in any class within the package of the protected members’ class.

  • Cannot be applied to all classes.

  • Access gives the subclass a chance to use the helper method or variable, while preventing an unrelated class from trying to use it.

New cards
25

Static

a non-access modifier in java which is applicable for blocks, variables, methods, and nested classes.

  • The member’s declaration must be preceded with the keyword static.

  • Used for any property that is common to all objects of that type.

New cards
26

Features of Modern Programming Languages that enable Internationalization

  • Use of common character sets among many platforms and languages, like UNICODE.

  • Platform independent high level languages (like java) enable code to run on many platforms.

New cards
27

Open-Source Movement

  • A movement that supports the use of open-source license for some or all software

  • Programmers who support the movement philosophy contribute to the open-source community by voluntarily writing and exchanging programming code for software development.

New cards
28

Open Source Advantages

  • Source code available, modifiable

  • Redistribute solutions

  • Use software in any way

  • Eliminates single point of failure

  • Democratic forum for action

  • No vendor lock-in

New cards
29

Open Source Disadvantages

  • No guarantee development will continue

  • Intellectual property (algorithms)

  • Support consistency

New cards
30

Proprietary Software Advantages

  • Predictable releases

  • Entity to hold responsible for bugs, errors, and updates

  • Consistent feature development

  • More stable framework

  • More consistent training options

  • Easier access to support

New cards
31

Proprietary Software Disadvantages

  • Higher start-up costs

  • Single company releasing patches

  • Vendor owns software

New cards

Explore top notes

note Note
studied byStudied by 13 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 13 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 32 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 14 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 3 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 49 people
Updated ... ago
5.0 Stars(2)
note Note
studied byStudied by 66 people
Updated ... ago
4.8 Stars(4)
note Note
studied byStudied by 240 people
Updated ... ago
5.0 Stars(3)

Explore top flashcards

flashcards Flashcard79 terms
studied byStudied by 5 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard600 terms
studied byStudied by 170 people
Updated ... ago
5.0 Stars(5)
flashcards Flashcard67 terms
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard40 terms
studied byStudied by 4 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard583 terms
studied byStudied by 13 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard36 terms
studied byStudied by 18 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard23 terms
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard41 terms
studied byStudied by 7 people
Updated ... ago
5.0 Stars(1)