Вы находитесь на странице: 1из 8

Assessment Criteria and Feedback

Source (100 marks)

Tasks

Tasks
Be careful to read the following carefully, marks are often needlessly lost
by not delivering what was requested.

Scenario
You have been hired by Logistics Ltd to help develop their logistics
management system. One day, your boss comes in to ask you to develop
two simple programs that meet the following requirements. Towards this
end, and to ensure that you fully meet the companys expectations, they
have provided you with two class declarations that you are expected to
adhere to in the delivery of your code.
NOTE: failure to write code that meets these specification (e.g.
putting load/ store code in the main function or making changes
to the public section of the classes) will result in significant marks
being lost. You should also only use the libraries specified. And
there is no point emailing after submission to ask if marks will be
lost if you use others because the answer simply be: YES.
Program 1
Write a program that contains a class that meets the following declaration
(i.e. this declaration should be put at the top of your cpp file):

Tasks

Your program should read sales values from a file called sales.txt and
outputs a bar graph representing these values to a file called graph.txt.
Create each bar in the bar graph by displaying a row of asterisks. Each
asterisk should represent 100 of sales.
For example, sales.txt file contained these values:
1000
500
1200
600
200
Here is what the graph.txt file should contain after the program is
executed:
SALES
(each
Store
Store
Store
Store
Store

BAR CHART
* equals 100)
1: **********
2: *****
3: ************
4: ******
5: **

Tasks

Program 2
The company has information on their employees in three different text
files(organisation.txt, hr.txt, payroll.txt), which all have slightly different
information depending on their purpose:
organisation,txt:

records: employee number, name, occupation and department


is ordered by employee number in ascending order

e.g.
0001
Stephen Jones
Sales Clerk
Sales
0002
John Smith
Programmer
OS Development
0003
Fred Blogs
Project Manager
Outsourcing
...
hr.txt:

records: employee number, address, phone number and national


insurance number

is organised by employee number in ascending order


e.g.
0001
11 Straight Avenue, Cardiff
02920999999
NX999999C
...
payroll.txt:

e.g.
0001

records: employee number, national insurance number and salary


is ordered by employee number in ascending order

Tasks
NX999999C
40000
...
Write a program that meets the following specification and prints out
those employees whose salary is greater than a given amount of salary
(e.g. 20000).

Tasks

Once the details have been loaded, the program should to display the
name, the address, the department and the salary of the employees that
meet the salary criterion when the displayEmployeeOfSalaryGTE
method is called.

Code Comments
It is of particular importance that your code is well commented. The
comments you make will form your documentation for this assignment
and the quality of those comments will contribute significantly to your
overall mark. Comments should attempt to describe the functionality of
each section of code and how it fits into the overall behaviour of the
program rather than just superficially describing what each line of code
does in isolation.
Right
x++; // x is the iterator used to keep track of the position in the data
structure
//which is incremented each time the code loops
Wrong
x++ //x is incremented

Tasks

Вам также может понравиться