EL2311、SQL

144 阅读4分钟

School of EngineringUCLan Coursework Assessment BriefAcademicYearModule Title: Software Development 2Module Code: EL23112023/2024Recording and analysing UAAVmovements with a database.This assessment is worth50% of the overall modulemarkTHE BRIEF/INSTRUCTIONSThe following Learning outcomes will be assessed in this assessment• 1. Develop appropriate software solutions to technological problems.• 2. Describe and apply features of an object oriented programming language.• 3. Effectively exploit the programming language and development environments.• 4. Effectively apply software design and development principles.Assessment Criteria Weighting (%)Software Development 70Report 30Total 100Introduction and backgroundStudents will be provided with the following software (on blackboard) :An SQL-Lite database file.A client program that generates an XML file with data.The aim of the coursework is to give students practical experience in object-oriented softwaredevelopment by implementing a system in an object-oriented language (C#) that involves anumber of real-world engineering applications (reading standard data format (XML), databaseaccess and storage, user interface design).The System.The UCLan autonomous all-terrain Vehicle (UAAV) is in testing phase, the UAAV has beendesigned to navigate extremely remote and hazardous locations and as such there will be manytimes when direct communication will not be possible. With this in mind a system has beendesigned that monitors various metrics around the vehicle and saves the data to a file. Thesystem saves a snapshot of readings once every 5 minutes whilst operating and saves the resultto an XML file for analysis (The client software simulates this by producing an XML file with allthe readings for that day).You have been given the task of writing a software system that can take the readings file, save itscontents to a database and allow engineers to access the data.The XML file contains data on when the readings took place, the UAAV’s speed at the time, itsinternal cabin temperature, its engine compartment temperature, its fuel level, its battery chargelevel and shock absorber wear.The database file (Readings.db) contains a single empty table (UAAVData) that has the followingstructure :Day RunningTime Speed CabTemp EngTemp Fuel Battery ShockWearWhere :• Day is the day the readings took place, this is an integer value set by the user in the clientprogram (note the UAAV is only ever tested once a day).• RunningTime is the time the UAAV has been running, all tests run over a 5 hour period,this is an integer value showing the time (in minutes) since the tests started.• Speed is a double indicating the speed in miles per hour that the vehicle is travelling at thetime. After the initial start, a value of 0 indicates that the vehicle has stopped andtherefore a fault has occurred.• CabTemp is a double indicating the internal temperature of the UAAV (in degrees Celsius).• EngTemp is a double indicating the Engine Temperature (in degrees Celsius).• Fuel is a double indicating how much fuel is left. The value is a percentage of remainingfuel.• Battery is a double indicting how much battery charge is left. The value is a percentage ofremaining battery charge.• ShockWear is a double, this indicates how much stress and strain the UAAV’s shockabsorbers have sustained during the test. The value generated is a unitless metricdesigned by an unknown engineer who has since left the project.The databases table has a composite primary key consisting of Day and RunningTime.Part One - Software development.The student is required to write a C# program that performs the following actions :• Reads in an XML file generated by the client program, it should do this cleanly with代 写EL2311、SQL outerrors and should be able to handle a malformed or non XML file being selected with anerror to the user but without a program crash.• Permanently stores the data in the database file.• Allows a novice user to run some basic queries on the database. (See below)• Allows expert users to run custom SQL queries on the database. (See below)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 toretrieve simple information out of the database. The information your program shouldallow them access to is as follows :i) For a user selected day, the maximum and average readings of the followingsensors (Speed, CabTemp, EngTemp, ShockWear)ii) For a user selected day, the minimum readings of the following sensors(Fuel, Battery)iii) For a user selected day, all the readings (along with time) if the UAAVbreaks down (see later)iv) A report showing all successful runs, all runs that resulted in a breakdownand all runs that completed successfully but were considered a failure (seelater).2) Expert User. These users should be allowed to write any SQL query they wish and have itrun against the database. The program should return sensible errors any time the SQLwritten is not valid. The expert users should NOT be allowed to add, modify or delete datafrom the database.Break Downs.The UAAV never stops moving in the test once it starts, any value of 0 in the speedattribute indicates a failure (all subsequent values for speed after that for the test will alsobe 0, the UAAV can not self repair).Things that can cause a break down are :• Running out of fuel.• Draining the battery.• The engine overheating.• Excessive shock wear.For the latter two the value at which the system breaks is currently unknown.Although it does not cause a break down (I.E. the UAAV will continue moving) if theinternal cabin temperature exceeds 30 degrees Celsius the test is considered a failure, due to it being an unsuitable environment to transport people.Part Two - DocumentationStudents are required to produce a report that details their development of the program writtenfor part one. The report should include the following sections:• Development description. A detailed account of what the student did in order to producethe submitted program. This may include diagrams showing data / process flow andcontrol, UML etc., any necessary assumptions made, testing details, explanation ofalgorithms used etc.• Testing plans to ensure the software is working correctly, this include (but is not limitedto) XML file loading, database queries, and database protection.• Brief discussion on ideas for improving the program, this discussion is theoretical and thestudent is not expected to implement changes, therefore the discussion should not belimited to changes that are either within the student’s ability range or within the timeallocated for the coursework.• The student should also provide an estimate on the working limits of the UAAV’s enginetemperature and shock wear and explain how they estimated these figures.• Brief discussion section that include how a system such as this could operate in real-worldconditions with autonomous vehicles.Software should be appropriately commented (in English) and should employ the techniques andprinciples of object-oriented programming demonstrated in the lectures and labs whereappropriate.Reports should be produced to a professional standard, reports that are badly formatted and/orcontain numerous examples of poor grammar/punctuation/spelling may be penalised.Word count for the report (not including tables, diagrams and code) should not exceed2000 words.PREPARATION FOR THE ASSESSMENT• All element WX:codehelp