Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In a school, the Personnel Department is responsible for storing details about all staff who work for the school. There are four categories of staff:

In a school, the Personnel Department is responsible for storing details about all staff who work for the school. There are four categories of staff: management teacher support staff

maintenance and kitchen staff All staff have a StaffID and a Name. The Name has three parts: title (Mr/Mrs), first name and surname. In addition, the salary for each member of staff is stored.

A teacher has a classroom in which they do all their teaching. A teacher is also responsible for a form group. Support staff are either part-time or full-time.

They are also allocated to one academic department. ..........

Software, using object-oriented programming, is to be written to process data about the staff.

For this solution, details about maintenance and kitchen staff are not included.

Management are classified as staff but are not teachers or support staff or maintenance and kitchen staff. (a) Complete a class diagram showing the three classes: Staff Teacher

SupportStaff Include all the properties described above. In addition, include a constructor method that is called when an object of the class is created. The method should allow the object properties to be initialised. There should also be a show method that displays all the property

values

of the object.

(b) Implement the classes designed in

(a). Use inheritance to create appropriate relationships between the classes.

(c) Test the code by creating objects from each class and then displaying their property values.

(d) Create a new class,

Name, which has three properties:

Title, FirstName and Surname. Include a

method, DisplayName that has two parameters: 1 - Name displayed in the format: spacespace 2 -

Name displayed in the format: space (e) Test the class Name and the DisplayName method. (f) Use containment to replace the title, first name and surname properties in your original Staff class with the new Name class. Test your changes. (g) Lunches are provided for all staff. The cost is 1/80 of their salary. Write a method that will display the cost for each member of staff. Test your solution. 3 UCLES 2012 9608/04/SPM/15 (h) Changes are made to the cost of the lunches so that the teaching staff are charged only 1/100 of their salary, and for support staff it is 1/120 of their salary. Use polymorphism to implement methods in the Teacher and SupportStaff classes for displaying the cost of lunches. Test your changes. (h) If all management staff were classified as either a teacher, or a member of the support staff, implement changes to your solution so that the staff class can be only used as a base class. Consequently an object cannot be created directly from the Staff class. Test your changes.

Five descriptions and seven relational database terms are shown below. Draw a line to link each description to its correct database term.

Description Database term Any object, person or thing about which it is possible to store data Dataset organised in rows and columns;

the columns form the structure and the rows form the content

Any attribute or combination of attributes that can act as a unique key Attribute(s)

in a table that link to the primary key in another table to form a relationship

Attribute or combination of attributes that is used to uniquely identify

a record Secondary key Candidate

key Entity Foreign key Primary

key Table Tuple [5] (b).State two differences between Static RAM (SRAM)

and Dynamic RAM (DRAM).Explain why a computer needs an operating system.

Explain what is meant by referential

integrity.Give two key management

tasks carried out by an operating system.

1 . 2Give two key management tasks carried out by an operating system. 1

Convert the denary number 46 to an 8-bit binary integer.Convert the denary integer - 46 to an 8-bit two's complement form. Convert the denary number 46 into hexadecimal.(b) Binary Coded Decimal (BCD) is another way of representing numbers. (i) Describe how denary integers larger than 9 can be converted into BCD. Give an example in your answer.(ii) Describe how an 8-bit BCD representation can be converted into a denary integer. Give an example in your answer.

Describe the basic internal operation of the following devices: (i) Keyboard. Optical disc. Optical mouse.Scanner

A motor is controlled by a logic circuit.

The circuit has inputs (0 or 1) from three sensors R, T and W.

The motor is switched off when the output from the logic circuit is

1. The following table shows the three sensors and the conditions being monitored.

Sensor Description Binary value Condition

R rotation 0 rotation < 4000 rpm 1 rotation >= 4000 rpm

T temperature 0 temperature >= 90 C

1 temperature < 90 C W water flow rate 0 water flow rate >= 50 litre/min 1 water flow rate < 50 litre/min The output, X, is 1 if: temperature >= 90 C and rotation >=

4000 rpm or temperature < 90 C and water flow rate >= 50 litre/min

(i) Draw a corresponding logic circuit. R T X W [5] 7 UCLES 2016 9608/11/O/N/16

[Turn over (ii) Give a logic statement corresponding to the logic circuit in part.

(iii) Complete the truth table for this system. INPUT Workspace OUTPUT RTW X 000 001 010 011 100 101 110 1 1 1.

A user watches a video available on a website. The website uses on-demand bit streaming. Describe how it is possible to watch the video without it continually pausing.

A small company produces scientific magazines.

The owner buys some new desktop computers.

The computers are used to store thousands of colour images

(diagrams and photographs). All the computers have Internet access. (a) Name three utility programs the company would use on all their computers. Describe what each program does. 1 Description. Description.Description

(b) The images contained in the magazines are produced using either bitmap or vector graphics software. Give four differences between bitmap and vector graphics.

Employees using the new computers receive training.

At the end of the training, each employee completes a series of questions.

Three answers given by an employee are shown below.

Explain why each answer is incorrect.

(i) "Encryption prevents hackers breaking into the company's computers."

"Data validation is used to make sure that data keyed

in are the same as the original data supplied.""

The use of passwords will always prevent unauthorised access to the data stored on the computers."

The table shows assembly language instructions for a processor

which has one general purpose register,

the Accumulator (ACC) and an Index Register (IX). Instruction

Explanation Op code Operand LDDDirect

addressing. Load the contents of the given address to ACC.

LDXIndexed addressing. Form the address from+ the contents of the index register.

Copy the contents of this calculated address to ACC.

STOStore contents of ACC at the given address.

ADDAdd the contents of the given address to ACC

. CMPCompare contents of ACC with contents ofJPEFollowing a compare instruction, jump toif the compare was True.

JPNFollowing a compare instruction, jump toif the compare was False.

JMPJump to the given address.

OUT Output to the screen the character

whose ASCII value is stored in ACC.

END Return control to the operating system. T

he diagram shows the contents of the main memory:

Main memory 800 0110 0100 801 0111 1100 802 1001

0111 803 0111 0011 804 1001 0000 805 0011 1111 806 0000 1110 807 1110 1000 80

8 1000 1110 809 1100 0010 : : 2

000 1011 0101 (a) (i) Show the contents of the Accumulator after execution of the instruction: LDD 802 Accumulator:

Show the contents of the Accumulator after execution of the instruction:

LDX 800 Index Register: 00001001 Accumulator: Explain how you arrived at your answer.

Complete the trace table below for the following assembly language program.

This program contains denary values. 100 LDD 800 1

01 ADD 801 102 STO 802 103 LDD 803

104 CMP 802 105 JPE 107 106 JPN 110

107 STO 802 108 OUT 109 JMP 112 110

LDD 801 111 OUT 112 END : : 800 40 801

50 802 0 803 90 Selected values from the

ASCII character set: ASCII code 40 50 80 90

100 Character ( 2 P Z d Trace table:

ACC Memory address OUTPUT 800 801 802 803 40 50 0 90

There is a redundant instruction in the code in part (b)(i). State the address of this instruction. ] (c) The program used the ASCII coding system for character codes. An alternative coding system is Unicode. (i) Give two disadvantages of using ASCII code.Describe how Unicode is designed to overcome the disadvantages of ASCII.

ENDWHILE CLOSE "PRODUCTS" OUTPUT "Product file contents written to arrays" [5] When Ahmed designed the PRODUCTS file, he considered the alternative file structure shown opposite. It stores one product per line in the text file. File PRODUCTS 0198 Plums(10kg) 11.50 0202 Onions(20kg) 10.00 0376 Mango chutney(1kg) 02.99 0014 Mango(10kg) 12.75 (ii) State one benefit and one drawback of this file design. Benefit.To code the 'Search by product code' procedure, Ahmed draws a structure chart showing the different stages. The procedure uses the variables shown in the identifier table. Identifier Data type Description SearchCode STRING Product code input by the user ThisIndex INTEGER Array index position for the corresponding product ThisDescription STRING Product description found ThisRetailPrice REAL Product retail price found You can assume that before the procedure is run, all the product data is read from file PRODUCTS and then stored in three 1D arrays as described in part (c)(i). Label the structure chart to show the input(s) and output(s). Lookup by product code INPUT search criteria Search for product code OUTPUT details.(e) A first attempt was made at writing the 'Search for product code' module. Ahmed designs this as a function ProductCodeSearch. The function returns an integer value as follows: if the product code is found, it returns the index position of the 1D array PCode being searched if the product code is not found, the function returns -1 Write program code for function ProductCodeSearch. Visual Basic and Pascal: You should include the declaration statements for variables. Python: You should show a comment statement for each variable used with its data type. Programming language

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Contemporary Engineering Economics

Authors: Chan S. Park

5th edition

136118488, 978-8120342095, 8120342097, 978-0136118480

More Books

Students also viewed these Programming questions