Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please show on Visual Basics The WSU motor pool manager needs a better way to track the usage of each vehicle, and by vehicle category.

Please show on Visual Basics

The WSU motor pool manager needs a better way to track the usage of each vehicle, and by vehicle category. Your current version of the webpage calculates the expense charge for renting a WSU vehicle from the motor pool and uses an array to store individual transaction records. Now summary data is needed therefore three tables used to store running totals is needed. In this assignment you build off prior work and extend that program by adding three levels of summary tables (individual vehicle, vehicle type, and grand total). Each summary table needs to be updated when the new rental is added to the transaction table. Use the data storage approach of when the new transaction record of data is added to the transactions table (the rental invoices), then you also update specific columns of running totals or metrics in the summary array data tables. The program should allow rental of one vehicle, which is one of three vehicle types (vans, trucks, sedans). An example of the updating needed is that when the transaction for a van rental is saved, you will need to update the running total for that individual van, and totals for the vans - adding the mileage, etc. to the totals for vans. Grand totals should also be updated. The goal is to understand the usage of each individual vehicle, and for each group of vehicles. So this program builds on prior by adding summary tables of running totals.

The major advancement of this program is the usage of data structures that get updated, therefore assignment submissions that do not use data tables will not be accepted for grading.

Requirements:

1. You should already have functionality that organizes a rental transaction into a row of data that is saved as a rental transaction. 2. The WSU fleet manager needs to see running totals (of mileage, etc.) a) for each specific vehicle (using Vehicle ID # such as truck#1, truck #2, truck#3), b) for each type of vehicle (vans, trucks, sedans), and c) grand total. You now need to plan out the columns for three more new data tables. Metrics (and therefore an array) mentioned in requirement #3 below are needed at the following three levels: a) individual vehicle. The WSU fleet has 3 sedan's, 3 minivans, and 2 trucks so you will need a table with 8 rows, one for each vehicle. Give each vehicle an ID such as Van1, Van2, etc. (so that mileage etc., can be totaled for the vehicle whenever it is rented) and other columns of descriptors of your choice (You are asked to also add the measures listed below in item #3 as columns of this array) . One row from this summary table needs to be updated after each rental. The usefulness here is that the manager can see if certain cars are high mileage and needing maintenance. b) type of vehicle. The WSU fleet has 3 vehicle types - sedans, minivans, and trucks so you will need a table with 3 rows, one for each vehicle type. Give each vehicle type an ID (so that mileage etc., can be totaled for the vehicle type whenever on of the vehicles in that category is rented) and other columns of descriptors of your choice. (You are asked to also add the measures listed below in item #3 as columns of this array). One row from this summary table needs to be updated after each rental. The usefulness here is that the manager can see which type of vehicle is rented most often. When a decision is made to purchase a replacement vehicle, the decision can be based on actual usage, not a guess.

c) grand totals - To hold grand total measures of the metrics mentioned next. This summary table needs to be updated after each rental. There is just 1 row in this table. (You are asked to implement the measures listed below in item #3 as columns of this array).

3. The metrics (numeric columns that must have default value of 0) needed at each of these three levels are:

a) the number of times rented

b) the number of days rented (use whole days)

c) the number of miles travelled.

d) the revenue generated by the rental.

2. Create the three new summary information datatables (individual, type, grand total). You will need to plan the names, and data types of the columns for each of the three tables. You can use a coding trick to generate the rows for the data table for the individual vehicles and vehicle type using a looping trick from module 5 programs. At page_init you can add the rows to the individual vehicle and vehicle type data tables.

After you build the summary table for individual vehicles and vehicle types you will want to put the vehicle descriptor (e.g WSU Sedan #1, or sedans) into a textual column. To add the vehicles to your vehicle summary table, and vehicle types to that table use the trick explained in the steps below. Automating this data entry is better than making the program user load the vehicles manually). Repeat this process once for the individual vehicles and once for the vehicle types.

a) set up radiobuttonlist controls for the specific vehicles and vehicle Types b) have a page_init procedure that adds the columns to the new data tables, and adds the rows. c) the numeric columns that will keep the running totals need to have a defaultvalue of 0. None of these three new tables has an auto-number first column. d) Here is the code used in a sample program to generate the correct number of rows for a summary array. The trick is that the loop runs once for each item in a radiobuttonlist. 'We need to create four rows of data, one for each labor grade. Previously when we created the columns, we set the default value for many of the columns to 0 (initialize the numeric columns). A radiobutton list exists for the labor grades, so we loop the items list of that control, placing the values into the first column of the new row.

For Each li As ListItem In rblLaborgrades.Items

Dim drAs DataRow = gdtLaborGradeTotals.NewRow

dr.Item("LaborGrade") = li.Text

gdtLaborGradeTotals.Rows.Add(dr)

Next

'if the above is too difficult you could just something as follows dim dr1 as datarow = gdtLaborGradeTotals.NewRow

dim dr2 as datarow = gdtLaborGradeTotals.NewRow

dr1.Item("LaborGrade") = "Framer"

dr2.Item("LaborGrade") = "PLumber"

gdtLaborGradeTotals.rows.add(dr1)

gdtLaborGradeTotals.rows.add(dr2)

'now display your data

GridView1.DataSource = gdtLaborGradeTotals

GridView1.DataBind()

End Sub

You could repeat this type of functionality to build a table of individual vehicles (adding the textual values truck1, truck2 etc. into the first column). If you used a second radiobutton list for the vehicle type (trucks, vans, sedans) you could loop that in a similar way to set up an array for the vehicle types. You could also use SELECT CASE processing of the specific vehicleID rented to figure out which vehicle type to update. You do not need a loop for the grand totals table as it has only one row.

3. The WSU fleet has 3 sedan's, 3 minivans, and 2 trucks. So create a table that has the 8 vehicles, some columns of descriptive info and the measures listed above and others you can think of. The fleet manager needs to keep track of individual vehicles to track their mileage and usage to make plans for vehicle replacement. The table with the vehicle types will have 3 rows.

4. When the vehicle is returned, a. update the correct row of the vehicle type table b. update the specific individual vehicle c. update the grand totals table (which has only the one row of data).

5. As an emerging designer, you are asked to consider the business needs of the WSU fleet manager and deliver 1 more numeric column with your own analytic. Please identify your additional feature in your submission info. You can add more columns of analytics for extra credit.

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

Principles of Financial Accounting

Authors: Belverd E. Needles, Marian Powers

12th edition

978-1133940562, 1133940560, 978-1285608464, 1285608461, 1133939287, 978-0357693605, 978-1285607047, 128560704X, 978-1133939283

More Books

Students also viewed these Accounting questions

Question

What is the purpose of the journal wizard?

Answered: 1 week ago

Question

What is the payback period for the new addition?

Answered: 1 week ago