Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write c# Program in Windows Form to Load and Parse the XML configuration files for vehicles. The program should be able to handle badly formed

Write c# Program in Windows Form to Load and Parse the XML configuration files for vehicles. The program should be able to handle badly formed files or errors in the data in a suitable manner without crashing the program. Need to create XML files for testing purposes.

Permanently stores the data in the SQLite database file. That is, the XML file created would be loaded in the SQLite Database to allow user to run the following queries

  1. The average top speed of electric, petrol and all vehicles.
  2. The top five vehicles in terms of range, weight, carry capacity, and top speed for petrol, electric and all vehicles.
  3. How long a chosen vehicle running at top speed could run for. (Assume range is constant regardless of any other factor).

Each vehicle is either powered by a petrol or electric engine and the configuration details are stored in a separate XML file for each vehicle. All vehicles have a unique ID, a range (in metres), a weight (in Kilograms), a carrying capacity (how much weight they can support in kilograms), and a top speed (in meters per second). Petrol vehicles also have specifications of a noise level (in decibels) and the number of cylinders their engine has, whilst electric vehicles have specifications of the engine voltage (in volts) and a binary value indicating whether the motor is brushless or brushed (0 for brushless and 1 for brushed). An example layout of the XML file is as follows :

For Petrol Vehicles

Petrol

Vehicle01

1500

35

12

24.9

65

4

For Electric Vehicles

Electric

Vehicle02

2500

30

10

22.1

40

0

These specifications are then stored in two of three database tables in an SQLite database. The database schema is shown below :

Table : Vehicle

vehicleID varchar(20) (Primary Key)

engine varchar(20)

range integer

weight integer

carryCapacity integer

topspeed real

Table : Petrol

vehicleID varchar(20) (Primary Key)

noise integer

cylinders integer

Table : Electric

vehicleID varchar(20) (Primary Key)

voltage integer

brushed integer

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

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions

Question

Why is cost accumulation imprecise?

Answered: 1 week ago

Question

10-9 How have social technologies changed e-commerce?

Answered: 1 week ago