Paper 1 (Questions) Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Difference between the usage of same method identifier and polymorphism overridinig:

A

Polymorphism overriding includes inheritence, while using the same method idenfiter in a different class allows you to create objects using the class, therefore the compiler will know which method to use by calling on the class which the object was created from.

Example:
lass Animal {
public void speak () {
System.out.println(“Animal speaks”)); }
}
class Dog {
public void speak(()
{ System.out.println(“Dog barks”)); } }

In this example, there are two methods with the same name speak, one in the Animal class and one in the Dog class. However, there is no conflict between them because each method is defined within its own class. When you call the speak method on an object of the Animal class, the Animal class’s speak method will be called, and when you call the speak method on an object of the Dog class, the Dog class’s speak method will be called.

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

Define the term bit.

A

Bit is a Binary digit;

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

Outline what is meant by beta testing.

A

Involves sending sample software to the intended audience;
(Selected audience do not pay for this software);
To try/use the software product;
And give the feedback to the authors (which help in correcting bugs);

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

Identify two additional features of a word processing package that could be useful for
this office.

Then

Outline the purpose of one application software package other than a word processing package that could be used in this office.

A

Identify two additional features of a word processing package that could be useful for
this office.

Insert (tables/pictures/graphs/formulas/…);
Mail merge;
Macros;
Print;
Etc.

Outline the purpose of one application software package other than a word processing package that could be used in this office.
Spreadsheet;
For graphically presenting various data;
Database software;
For holding employees/customers data;

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

Outline one problem that may arise from the installation of new hardware and software
in the office.

A

ompatibility Issues:
One common problem that arises from the installation of new hardware and software is compatibility issues. This occurs when the new hardware or software is not compatible with the existing hardware, software, or operating system. It can cause the system to malfunction, crash, or fail to operate correctly. This can result in data loss, downtime, and additional costs to resolve the issue.

system malfunction due to compatibility issues can result in data loss, downtime, and additional costs to resolve the issue. Therefore, it’s essential to ensure that new hardware and software are compatible with the existing system and meet the required specifications.

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

Encapsulation

A

Encapsulation means having private variables;
Variables not directly accessible from outside the class; Methods and variables are all included in the class definition

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

Usability

A

Usability:
Usability means making the computer systems easy to use, matching them more
closely to user needs and requirements;

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

Describe two types of documentation that should be provided with the software package.

A

Technical documentation; Describes how to install software; Describes the hardware configuration needed;
User documentation; Describes various functions of the software; Helps users to learn how to use the software;

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

An international company is in the process of moving its Head Office from Europe to Asia.
(a) Identify two possible compatibility issues as a part of data migration.

A

Language differences/different character set;
Different conventions of representing various data/currencies, dates, etc;
Incompatible software/incompatible hardware;

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

Outline the function of an operating system in managing primary memory.

A

Outline the function of an operating system in managing primary memory.
A part of the OS (memory manager) assigns that block of memory to the program when a running program requests a block of memory;
When the program no longer needs the data in previously allocated memory blocks, they become available for reassignment;

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

Outline the need for higher level languages.

A

Outline the need for higher level languages.
High-level language(HLL) provides statements (for example, high level if(…), while(…) , etc) which are not dependent on the specific machine / and ability to create various data structures;
Which saves the programmer’s time;
Higher level languages are closer to human language;
So programmers find them easier to understand/work with than lower level languages;

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

Explain two benefits of using sub-procedures within a computer program.

A

Explain two benefits of using sub-procedures within a computer program.
Problem could be divided into smaller/easier parts;
Which means solving easier/smaller parts of the problem for one programmer; Or for a team of programmers, each programmer could work on different smaller parts;
Simpler testing;
Each part of the program could be separately tested;
By the programmer who created the code or someone else in the team of programmers;
Reusable code;
Sub-procedures already written/tested could be used in various programs;
Simpler maintenance and changes;

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

Identify three characteristics of a collection.

A

Collections are abstract data structures , does not have a set number of length, Collections have a set of methods that define operations performed on the elements/objects of that collection; (such as getnext, hasnext)

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

Construct in pseudocode an algorithm, using the access methods of a collection, which will iterate through the collection NUMBERS and count how many elements stored in the collection are in the interval [–1,1].

A

COUNTER = 0 NUMBERS.resetNext()
loop while NUMBERS.hasNext()
ELEMENT = NUMBERS.getNext()
if ELEMENT >= -1 and ELEMENT <= 1 then // abs(ELEMENT) <= 1
COUNTER = COUNTER + 1 end if
end loop output COUNTER

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

Difference between inherintee and aggregation:

A

While both can achieve the same result, Aggregation (composition) can lead to more robust and safer code;
whereas inheritance is a more flexible solution but prone to errors due to the behaviour of subclasses being changed;
Inheritance allows for code reuse / lowers maintenance cost; whereas aggregation does neither of the above;
Can have more than 1 aggregation; but only 1 superclass (in Java);

Ownership: Inheritance represents an is-a relationship between classes, where a subclass is a specialized form of its superclass. In contrast, aggregation represents a has-a relationship between objects, where an object contains another object as a part of it.
Object Lifetime: In inheritance, the subclass object is dependent on the superclass object and cannot exist independently. The lifetime of the subclass object is tied to the lifetime of the superclass object. In aggregation, the part object has its own lifetime and can exist independently of the whole object.
Reusability: Inheritance allows for code reuse by allowing the subclass to inherit properties and methods from the superclass. This makes it easier to create and maintain the code. Aggregation allows for objects to be composed together to form more complex objects, but does not provide the same level of code reuse as inheritance.

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

peripheral

A

A peripheral is an external (computer) device that is connected to a computer, such as
a keyboard;

17
Q

Compilers translate source code into object code. Identify two other operations performed by a compiler.

A

Error detection and reporting: Compilers check the source code for syntax errors, semantic errors, and other issues that may prevent the code from being executed. If any errors are found, the compiler will generate error messages that describe the issue and provide information about where it occurs in the code.

Optimization: Compilers often include optimization algorithms that can make the generated code run more efficiently. This may include things like removing redundant operations, rearranging code to reduce branch misprediction penalties, or using more efficient algorithms to perform certain operations. These optimizations can improve the performance of the generated code and make it run faster.

18
Q

Outline two andvatges of inherteince

A

Outline two andvatges of inherteince
: Code redusability, and It reduces maintenance overhead;
Because you only have to update the parent;

19
Q

One of the functions of an operating system is memory management.
Describe how this function prevents the system from crashing when more than one program is
run at the same time.

A

The OS allocates (and deallocates) specific sections of memory to each program/process/module;
This ensures that the memory assigned to one program is not overwritten; Uses secondary/virtual memory to allow more processes to run simultaneously;

20
Q

Explain how compression of data may lead to negative consequences.

A

Decompression will not return the complete file/some detail will have been removed;
Which in some cases e.g. audio/video may be unacceptable;
If original not saved/lost there is no way to recover it;

21
Q

Selection sort

A

Selection sort is a simple sorting algorithm that works by repeatedly finding the minimum element from an unsorted portion of the array and swapping it with the first element of the unsorted portion. The algorithm sorts the array by iterating through it and selecting the smallest value, which is then swapped with the first value. The process is repeated with the remaining unsorted elements until the entire array is sorted.

22
Q

Other than the use of different keywords, outline two ways in which two higher level
languages might differ from one another.

A

Method of translation;
Whether by compiler or interpreter (or both);

Syntax differences;
Structure of statements etc;

23
Q

Other than data migration, describe two aspects of change management that may arise from this takeover.

A

Data loss;
Due to transmission faults/lack of adequate storage;
Incompatible file formats;
Which could lead to incomplete or incorrect data transfer;
Different file structures;
Which will result in a mismatch of data, for example in customer records;
Validation rules differ between companies;
Which could lead to inconsistent/incorrect results;
Different character sets might be used;
Which could lead to inconsistent/incorrect results;
Different languages might be used; Leading to translation issues;
Data corrupted when transferring (data) files;
And not usable at destination;

24
Q

identify two aspects of the data that need to be taken into account during the planning
of the new system.

A

The type of access needed;
For example read only/read write/online or offline;
Access rights;
For example, data available only for administrators / different permissions for students;
Frequency of access;
Some data (of non-current students) are not frequently accessed and can be archived;
Other data (of current students) are frequently used, subject to a variety of operations;
Quantity/size of the data;
For example quantity of the data should not exceed storage capacity of the new system;

Type/nature/format;
For example incompatibility issues;

25
Q

Describe how direct observations on the current system may provide information to
help propose a suitable new system.

A

realistic information on data/software/hardware/users/procedures in the current system;
will help in better understanding

Help better understand positive and negative features of the current system (for example problems in accessing or validating data/user errors/security issues, etc.);
Which can be used when specifying requirements of the new system (keep/improve positive and change negative features);

26
Q

Prototype

what is it used for

A

a prototype refers to an initial version of a program or software product.

Prototype is used to ensure all essential functions/operations of the system are present/meets the needs of the users;

Prototype is used to speed up the development process;

Positive user’s feedback helps in refining the acceptable prototype in order to develop the complete system/product;
Or else a further prototype should be created in order to develop the satisfactory system/product;

it can speeden delvopment process because:
it can detect early design issues

Early detection of design issues: Prototyping allows developers and stakeholders to quickly test and evaluate design concepts and functionalities. This can help detect potential issues or errors early in the development process, before significant resources have been invested.

27
Q

Discuss two possible problems that may occur during data migration.

A

Data loss/data corruption;
When moving data, from one storage device to another (via network/ cables or transferred by people), data could be corrupted/lost and not useful anymore;

Incompatibility of data formats;
Necessary to translate from one format to another, to be able to use the data in the new system which causes delays/performance issues in business/office operation;

Data corruption: During data migration, it is possible for data to become corrupted or lost. This can occur if the data is not properly validated, if there are errors in the migration process, or if the new system is not compatible with the data format of the old system. Data corruption can result in data that is inaccurate, incomplete, or unusable.

Data format incompatibility: Another potential issue that may arise during data migration is data format incompatibility. This can occur if the new system does not support the same data formats as the old system. For example, if the old system uses a proprietary data format that is not supported by the new system, it may be difficult or impossible to transfer the data without first converting it to a compatible format.

28
Q

State where the operating system is held when the computer is turned off.

A

ROM

29
Q

TELOS:

A

Technical feasibility: Is the existing technology sufficient to implement the proposed system?
Economic feasibility: Is the proposed system cost effective?
Legal feasibility: Are there any conflicts between the proposed system and any regulations/laws?
Operational feasibility: Are the existing organizational practices and procedures sufficient to support the maintenance and operation of the new system?
Schedule feasibility: How long will we wait?

30
Q

Name two features of a compiler (other than trsnaltion)

A

Optimization: Another important feature of a compiler is optimization, which refers to the process of improving the efficiency and performance of the generated machine code. This can involve techniques such as removing redundant code, reordering instructions to reduce the number of CPU cycles needed to execute a program,

and error checking
A compiler also performs error checking on the source code to detect syntax errors, semantic errors, and other issues that may cause the program to behave incorrectly or crash during execution. The compiler will report any errors found during the compilation process, helping the programmer to identify and fix problems in the code.

31
Q

how many comparisons is neede for a 10 unsorted bubble sort (worst case scenario)

A

9 + 8 + 7 + 6 + 5 + 4 + 3 + 2 + 1 = 45.

Therefore, it would take 45 comparisons to sort a 10-element array that is initially in descending order to ascending order using bubble sort.

32
Q

Outline the need for higher level languages you need one more

A

Productivity: Higher-level languages are more productive than lower-level languages. They allow developers to write code more quickly and efficiently. Higher-level languages provide built-in functions and libraries that make it easier to write code

Readability: Higher-level languages are often easier to read and understand than lower-level languages. Higher-level languages use more human-readable syntax and provide built-in functions and libraries that make it easier to write code that is easier to read and understand. This results in code that is easier to debug, modify, and maintain.

33
Q

Identify two sources of risk to personal data in this online system.

State two measures that the book shop can take to address the risks identified
in part (d)(i).

A

Data can be at risk whilst stored on the shop’s disk;
Data can be at risk during transmission;

All private information must be encrypted;
Transmission channel must be protected by encryption;
Logging on to the system must be secured (to prevent intruders);
Dual data back-up system in case of accidental deletion;

34
Q

Identify two reasons why consistent grammar and syntax should be essential features
of a higher level programming language.

A

Easy to learn/use;
Otherwise time may be wasted learning the new language/writing programs in
this HLL;
There will be no/less compilation errors;
There will be no/less logical errors;
(Reduction of time to create software;)
Future maintenance/development is possible by other programmers;

35
Q

Identify two features of a user interface that will allow application programmers to
interact more easily with the programming language.

A

GUI;
T oolbars;
Menus;
Built in commands for inputting from touch screens;
Predicted text so that typing a class name followed by a full stop will bring up a list
of methods/attributes;
Automatically use a colour to represent keywords/variables and improve readability

36
Q

Outline the need for an interpreter or a compiler.

A

Must be translated from a higher level language understandable by
humans/not understood by machines;
Must be translated into machine code;
For the CPU to execute it;

37
Q

Describe one advantage to application programmers of having both an
interpreter and a compiler available

A

One advantage of having both an interpreter and a compiler available to application programmers is the flexibility it provides in the software development process. Programmers can use the interpreter to quickly test and debug their code in real-time, allowing for faster iterations and a more efficient development cycle. This can be particularly useful in the early stages of development, where code changes and debugging are frequent.

Once the code has been tested and debugged using the interpreter, the programmer can then use the compiler to generate optimized machine code that can be executed more efficiently. This can result in faster execution times and better performance compared to interpreted code

38
Q

Describe the function of the control unit (CU) in the central processing unit (CPU).

A

Obtains the data/instructions from the memory;
Interprets/decodes them into commands/steps/signals;
Controls transfer of data and instructions among other units of a CPU (for example, command to ALU for execution);
Manages/coordinates all the units of the computer;

39
Q

Libary and name two advnatges

A

a library is a collection of pre-written code or functions that can be reused in different programs

ime-saving: Libraries can save developers a significant amount of time by providing pre-written code that can be used to perform common tasks. This allows developers to focus on solving the specific problems they are trying to address, rather than spending time writing code from scratch.
Reliability: Libraries are often written by experienced programmers who have tested and refined the code over time. By using libraries, developers can take advantage of this expertise and rely on the library to perform its designated function without having to worry about bugs or errors. This can make programs more reliable and easier to maintain.