Algos Flashcards

1
Q

Variables - general concept

A

Hold values which the program will interpret and communicate. They store information for later use. A word is assigned to the information by which it can be retrieved.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Variables - In Java

A

Different data types based on what kind of information they will store.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Strongly Typed Language - Java

A

Concept used to refer to a programming language that enforces strict restrictions on intermixing of values with differing data types. When such restrictions are violated an error (exception) occurs. Typing in Java allows the programming language to know with absolutely certainty that the information being stored in a variable will be ‘a certain way’.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Data Types

A

The types of values within a program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Primitive Types / Scalar types – JAVA

A

Simple data types. They relate to a single piece of information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Control Structures

A

When the program needs to make a decision: Decision is based on the variables given. The control structures are the decisions that will affect the flow of the code. The code flow is the direction the code is being read by the computer (running program).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Choosing which lines of code to execute and which ones to skip

A

Dependent on the state of the variables (the value at any given time). While-loop - Purpose: To execute code between ‘{}’ over and over until the condition becomes false.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Data Structures - In Computer Science

A

A particular way of storing and organizing data in a computer so that it can be used efficiently. Just a way to get around having to create tons of variables.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Syntax - Concept in Computer Science

A

Set of rules that define the combinations of symbols that are considered to be correctly structured programs in that language. Particular layout of brackets (), curly brackets {}, variables, indentation etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Defining a variable in Java

A
  1. Variable type 2. Variable’s name 3. Value of the variable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How can we run Java programs in the absence of an IDE?

A

The default approach is using the command line user interface. The command to compile Java source code is javac. The command to run the Java program is java.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Object-oriented programming (OO programming)

A

Involves defining classes and then creating objects from those classes. Objects: Parts that the model is built up from are the objects that appear in the problem domain. Represented in a computer program by chunks of computer code. Need to define what information the object will hold (attributes) and what is capable of doing -> Defining a Class. Class file: Where we write the code to specify the attributes (info to be held) and methods (what objects can do).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Problem domain

A

A problem domain is the area of expertise or application that needs to be examined to solve a problem. A problem domain is simply looking at only the topics you are interested in, and excluding everything else.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Structure of Java Code

A

In Java few rules about the order in which you choose to define the fields and methods within a class. Important to choose a style and be consistent so it’s easier to read and understand.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Main Method

A

[Your answer for Main Method was missing in the original]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Declaring and initialising variables

A

[Your answer for Declaring and initialising variables was missing in the original]

17
Q

Assigning values to variables

A

[Your answer for Assigning values to variables was missing in the original]

18
Q

Indentations

A

Indicate the block structure applied to for loop, while loop and if-else statements

19
Q

Interpreting looping constructs while, for and repeat-until, if else conditional construct

A

Similar to those in Java and Python