WEEK 1 - Java building blocks: data types, expressions and controls Flashcards

1
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
2
Q

Compiling and running Java programs outline:

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

Object - orientated programming (oo programming)

A
  • Involves defining classes and then creating objects from those classes
    • Objects: Parts that the model is built up form 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
4
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
5
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 chose 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
6
Q

Main Method

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

Declaring and initialising variables

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

Assigning values to variables

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