Week 1 Flashcards

1
Q

What is OOP

A

Object-orientated programming is concerned with constructing computer systems out of units of code called classes which are templates for creating objects.

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

what is the OS resposnsible for?

A

The operating System is responsible for the control and management of hardware and basic system operations, as well as running application software.

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

What are 7 of the things the OS does?

A

Management of memory Coordination and control of peripheral devices Scheduling of access to the processor Provision of basic utilities Provision of an interface between applications/programs and hardware Provision of a user interface Booting your computer

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

How does the OS manage memory?

A

it allocates appropriately sized areas of memory to each program and to ensure that program instructions and date do not interfere with each other.

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

How does the OS Coordinate and control peripheral devices?

A

The OS cooridnates the Input (from keyboards and Mouse) reading a file from a storage device, output to a display device and maintaining a connection to a network.

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

How does the OS schedule access to the processor?

A

The OS priotises jobs to run and ensures that the processor is used efficiently. for example if the current program finishes then another program is given access to the processor.

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

How does the OS provide basic utilities?

A

OS provide disk formatting facilities, file management systems and software installation wizards.

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

How does the OS provide an interface between applications/programs and hardware?

A

The OS provides a an application programming interface (API) which is a set of high-level instructions ( a protocol) through which an application can talk to the OS to request services such as printing or sasving. so for example instead of a program asking the printer to print the program asks the OS to ask the printer to print. This helps with computers working across different computers.

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

How does the OS provide a user interface?

A

Most Interfaces are GUI’s with hidden away text baed interfaces. GUI’s are more intuitive and easier to learn and use.

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

How does the OS boot your computer?

A

there is a boot program stored in the computers ROM and is often called firmware. firmware consists of prorams that provide core functionality to a device that will not disappear when power is lost.

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

What is the difference between a compiler and an interpreter?

A

a compiler will translate an entire program from source code to machine code, whilst an interpreter will only translate a line of code as and when required.

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

What is bytecode?

A

It is an example of an intermediate code, which could be thought of as machine code for a virtual machine. Using this intermediate code means that code can be moved unchanged between different computer systems.

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

what is the advantage to using a compilation model that makes use of virtual machines?

A

it ensures that the intermediate code, no matter on what machine it was compiled it can be translated for execution on many different computers, so long as each computer has the correct virtual machine.

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

Why is Java software relatively portable between different platforms?

A

Java software is portable because it runs on a VM, and the JVM masks inherent differences between the underlying architectures and operating systems on different computer platforms. As long as you have a suitable JVM for a platform, you should be able to run Java software on that platform.

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

What is/was procedural programming?

A

is so called because the program code gives a step-by-step procedure (i.e an algorithm) for solving ‘the problem’.

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

What are two important aspects of of an object?

A

its attributes and its behaviour.

17
Q

define an objects attributes.

A

An attribute is some external property or characteristic of an object, for example a ‘patient’ object may have attributes such as condition, date admitted and medication.

18
Q

what is an objects behaviour?

A

each object has a set of messages that it understands, the action an object performs in response to a particular message is an example of behaviour. we also use term behavious to mean the collection of actions an object might carry out in response to all the messages it understands.

19
Q

what is an identifier?

A

its the name that is given to attributes in code, such as ‘credit limit’ in to ‘creditLimit’.

20
Q

define an object’s state.

A

This is the combined value of all the object’s attributes. For example the state of a bank account object could be the value of balancer and creditLimit.

21
Q

Why was the concept of Java Editions introduced?

A

To cater for the different needs of large international buisness systems running on extensive networks with many servers as opposed to software running on mobile phones with very limited hardware resources.

22
Q

What are the main reasons for Java’s popularity as a programming language? (5 reasons)

A

Familiarity of style to existing programmers. Platform independance (portability) - Java runs on a wide range of hardware platforms. Robustness - Java avoids many error-prone featrues of some other languages Security - by design, Java allows the coding of relatively secure applications. Object_orientation - Java was designed with Object-orientated programming in mind, and so provides all the benefits of this programming approach.

23
Q

in a Java statement what is a message and what is a receiver?

A

receiver frog1.left() message

24
Q

what is a message-send?

A

a code that is made up of a variable name, followed by a full stop and then a message.

25
Q

in the following code, indicate the message and the object receiving the message. frog2.brown()

A

The message brown() i ssent to the object referenced by the variable frog2 - this object is the receiver.

26
Q

describe a class and its instances

A

A class is like a blueprint or template for the creation of objects and ensures that all its instances have the same attributes, and are able to respond to the same set of messages in an identical manner.

27
Q

‘Instances of a given class have the same attributes.’ Explain this statement.

A

A class defines what attributes each instance of the class will have.

28
Q

What is a protocol? (regarding the Amphibian Microworld)

A

The list of messages any instance of the class Frog can understand. The protocol of a Frog object, as we know it so far, is left(), right(), green() and so on.

29
Q

Use the terms ‘class’ and ‘protocol’ to explain why a Frog object does not understand the message up() and down().

A

The class defines the set of messages (the protocol) an instance of the class understands. Frog objects are instances of class Frog and the protocol for this class does not include the messages up() and down().

30
Q

Describe an Object Diagram

A
31
Q

Why are the componenets of a domestic electrical system (such as plugs and light bulbs) a suitable ana;pgy for the ideal software industry?

A

It is a suitable analogy because the domestic electrical system depends on standard parts; you can exchange different makes of each component, such as a plug or a bulb (at least within one country), and the system will still work. As long as each component works as intended, its make is irrelevant.

32
Q
A