THE BRIEF/INSTRUCTIONS
The following Learning outcomes will be assessed in this assessment
Introduction and background
Students will be provided with the following software (on blackboard) :
An SQLite database file.
The aim of the coursework is to give students practical experience in object oriented software development by implementing a system in an object oriented language (C#) that involves a number of real-world engineering applications (writing threaded code, reading standard data format (XML), database access and storage, user interface design). The System.
A company makes and sells robots of varying types, they need to keep track of what they make and who they sell them too. The company has a database (cwkdb2024.db – on blackboard) that consists of two tables : robots model : text (primary key) price : real type : text current : integer stock : integer customers orderNo: integer (primary key) name : text postcode : text model : text (foreign key) quantity : integer orderDate : date
In the robots table : · model - This is the model name of a robot, it’s stored as a text string and is used as the primary key as each model is a unique value. · price – This is the retail price of the robot and is a floating point value. · type – This is the type of robot that the model is and refers to the type of activity the robot does, this is stored as text and is left to the student to come up with suitable examples (two are included in the database already, see later) · current – This is an integer acting as a Boolean that states whether the company is currently producing this type of robot. 0 means the robot is not currently made, 1 means it is. · stock – An integer value that states how many robots of a type the company has in stock. Note even if a robot is not currently being made there may still be stock left of it.
In the customers table : · orderNo – A unique integer value that identifies the order made by a customer. Each order refers to a single model of robot. If a company were to order two different models of robot at the same time two orders would be created. Used as the primary key for the table. · name – A text field that identifies the company name that bought the robot. · postcode – A text field that contains the postcode address of the buyer. · model - The model name of the robot bought (text field). This attribute references the model attribute of the robot table as a foreign key (refer to lecture notes if you don’t remember what this means). · quantity – Integer value that states how many robots the customers bought in this order. · orderDate – Date field that specifies when the order was fulfilled.
Each table currently has three example entries in them
robots:
Here we can see the driveRob01 cost 3999.95 pounds was of type autonomousMobile and is no longer in production, the company still has 15 left in stock. driveRob02 cost 4999.95 pounds is of type autonomousMobile is currently in production and that the company have 25 in stock. Finally noseDive cost 350.99 pound, was a manualDrone and is no longer in production, the company have 6 left in stock. customers:
Here we see that order 1 was for Bob Smith & Sons, their postcode was BB1 1QT they bought 15 driveRob01 robots and this was completed on the 16th May 2014. Etc.
Part One - Software development. The student is required to write a C# program that performs the following actions :
There are two types of user that you need to account for when writing this program.
1) Novice Users. These users know no SQL or database theory at all, they need to be able to retrieve simple information out of the database. The information your program should allow them access to is as follows : · Bring back a list of all robots currently being produced. · Bring back a list of all robots over a user defined stock value. E.G. bring back all robots that we have more than 5 of in stock. · Bring back the name of all companies that have bought a robot that is currently in production. · Bring back the total worth of all the robots that we have in stock. · Bring back the order numbers of all orders between two user defined dates. E.G. All orders fulfilled between 2001-01-01 and 2013-01-01.
2) Expert User. These users should be allowed to write any SQL query they wish and have it run against the database. The program should return sensible errors any time the SQL written is not valid. The expert users should NOT be allowed to add, modify or delete data from the database without supplying an admin password.
Students are heavily advised to get the program to work using single threaded methods first and to attempt multithreaded solutions once a working single threaded version is produced. Part Two - Documentation
Students are required to produce a report that details their development of the program written for part one. The report should include the following sections :
Software should be appropriately commented (in English) and should employ the techniques and principles of object oriented programming demonstrated in the lectures and labs where appropriate. Reports should be produced to a professional standard, reports that are badly formatted and/or contain numerous examples of poor grammar/punctuation/spelling may be penalised. |