The programming exam 30th of April 2009

Read these exam rules carefully before doing tasks and after you have done tasks.

Task 1

Create a console application  Customers, that reads data from a XML-file [download] and shows data of customer companies in console.
There XMLfile has the following schema:

<customer>
<id>P1001</id>
<lastname>Brown</lastname>
<firstname>Charlie</firstname>
<company>Peanuts Ltd</company>
<title>Mister</title>
<customer-group-id>CG1</customer-group-id>
<revenue>1000</revenue>
</customer>

Functional requirements:

Default time: 60 min. Points [max 10 points]
- reading data 1 p
- presenting right data in right  format 2 p
- sorting companies 1 p
- count companies 1 p
- sum of sales 1 p
- arguments 1 p
- error handling 2 p
- test batch file 1 p

Task 2

There is a small company named Autokauppa JintaRouppi. It sells used cars. Car salesmen of the company need a simple application to read, add, change and delete data of cars.

Create a Windows-application  WinCars.
With the application a car salesman can:

  1. browse data of all cars
  2. filter so that an end-user can select one mark (for example Audi) and he/she will see only Audis, use suitable combobox for selecting
  3. add cars
  4. delete cars
  5. change the selling price of the selected car
  6. in real-time see the sum of selling price of all cars in a textbox or label

Cars of the company are stored to in the XML-file  named as  Cars.xml [download].
The location of the file is set in App.Config file and in the start the application reads the filename from App.Config.
Create a proper key&value to AppSettings section; set value to
d:\data\cars.xml.
The XML-file has the following schema:

<Auto>
<aid>11</aid>
<license>KJL-132</license>
<mark>Audi</mark>
<model>100 2.0e</model>
<year>1989</year>
<sellingPrice >49000</sellingPrice >
<purchasePrice>8250</purchasePrice>
</Auto>

Design and implement  suitable Windows-GUI. Please, try to do GUI is simple as possible, and easy to learn and use (also for carsalesmen :-)

Implement also these error handling:
- If the App.Config does not exist or the needed value does not exist, give an error message.
- If the file, that has been set in App.Config, does not exist, give an error message.
- If the file, that has been set in App.Config, does not have  a right schema, give an error message.

Default time: 1h15 min Points (max 11 points):

Select 3a or 3b, and do only one, not both.

Task 3a

We have a group of programmers who need to share Tasks in a software projects.
Create a Web Application for handling Task data. The name and directory of the datastore is in Web.Config configuration file.
The datastore can be text file, xml-file or Access database. There are two kind of data in datastore: users and tasks. Create datastore with proper schema  and use it. Put datastore to the directory d:\data and point it in Web.Config. It is not allowed to put the datastore any other directory.

About users there must be at least following data:
- first name
- lastname
- e-mail address (use it as username)
- password (no need for encryption now)

About tasks there must be at least following data:
- name of the task
- date when added to datastore
- due date (it means date when task should be done)
- completed date (date when task was done, empty if task is not finished)
- additional information (text)
- person in charge (from the users)

When a programmer navigates to the web site, he/she must identify and authenticate him/herself with username and password. If authentication is succesfully, the programmer is directed to main page. A programmer can try autentication three times, if authentication is not succesfully, a programmer is directed to an error page.
In the main page a programmer can:
- add tasks
- remove tasks
- change details of tasks
- mark tasks completed (application automatically adds completed date when task is marked completed, the programmer just clicks button...)
- filter tasks with following filter:
  1) show only programmers own uncompleted tasks
  2) show all programmers uncompleted tasks
  3) show all programmers completed tasks

NOTE that there is no need to create functionality for adding user data, you can put some test users to user data store.
Create only functionality for authentication of an user and in adding a task, a task is binded to a user. 

Use MVC-model, so put all data handling to own class, name it as BLData.

Default time: 1h30 min. Points: max 15 points
- datastore 2 p
- configuration file 1 p
- authentication  1 p
- reading data 2 p
- select 1 p
- editing 1 p
- deleting 1 p
- filter 1p/each max 3 p
- MVC-model 2 p

Task 3b

Create a Windows application "one handed zlot machine".

In the beginning a player has 10 zlotys, one spin costs one zloty. There is a button "Spin" where the player can start playing. Create eight different jpg-pictures, with same size. Motifs of pictures you can select freely, for example they can be country flags, logos of teams etc. When the user plays the application draws three pictures.
More requirements:

Default time: 1h30min

Points  max 15 points
- user interface 2 p
- drawing 2 p
- animation of drawing 1 p
- winning logic 2 p
- real time mount of money 2 p
- extra feature locking 3 p
- attractive outlook 1 p
- extra "golden" features 2 p