Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am using Visual Basic and I am having a lot of trouble with arrays and queries. Any help would be appreciated!! CIS115 Review Lab

I am using Visual Basic and I am having a lot of trouble with arrays and queries. Any help would be appreciated!! image text in transcribed
image text in transcribed
image text in transcribed
CIS115 Review Lab (Spring 2020) ou have been assigned the task of writing a program for a beach equipment rental company that will calculate each ay's rental income. A sample form is shown below: OP200 "Process Order" Button Click Event: This event will be run each time a rental is made and should: Verify that the user did enter a name in the name textbox (data validation) Verify that the user did enter a valid numeric value for the number of hours that the equipment will be rented in the hours textbox (data validation). Verify that the user did select an equipment type from the given radio buttons (data validation). Determine the Order Id (First initial of first name and First initial of last name combined with an order number that will begin with 100 each day and increase by 5 for each order) which should be displayed as part of the output Calculate the Order Cost (Simply hours times rate) which should be displayed as part of the output. Generate a CSV record that contains the following information: o Order Id records orders, order Colt Order Cost o Equipment Rented Rental Hours Once generated, this CSV record should be written to the daily rental array that will hold all rentals for each day. Provide a meaningfully output showing the outcome for this process. This output should include: Header (meaningful line that describes what is being displayed) Blank line (between the header and the first detailed line of output) o Detail information line(s) which show: Name John miller Order id Equipment Rented orderio (OM YOO) Rental Hours Order Cost - hout late - Be sure to clear the listbox before displaying each new order details oss level variants: Hradcano.cht und Then -order number ftarts @100 traercost hours * 15 inurements by S. equipment: "Cande" hetked The bordernumber "Daily Summary Report Button Click Event: This event is to be run at the end of each day and should: Resize the daily rental array so that no unfilled records are kept in the array Validate that the array isn't empty before generating the report. Once resized (thus eliminating any unused/empty records), this event should use a FOR I NEXT Loop to read through the daily rental array and display the following output: o Header (meaningful line that describes what is being displayed) O Blank line (between the header and the first detailed line of output) o For each rental record in the array, the following detail lines should be displayed (making up one line of output for each record): Order Id . Order Cost o Once all detailed lines have been processed, display another blank line. o Finally, display the total number of rentals for the day along with the total day's income. . Be sure to clear the listbox before add new output and format your output to make it readable. "Selected Equipment Query" Button Click Event: This event should be run after the daily rental array has been resized to remove unused/empty elements. - Validate that the daily rental array isn't empty. Validate that one of the equipment type buttons has been selected (data validation). Using a LINQ, generate a query result from the daily rental array that includes: o Records where the equipment rented field matches the selected equipment type. Include the rental hours and order cost fields in the results output. O Put the results in order from lowest order cost to highest. Using a For Each loop, generate a well format output (using the details shown in the last button as a guideline) that will display the results from the query. If no records were selected as a result of this query, the output should let the user know. "Programmers Choice Query" Button Click Event: This event is to be created by 'you'. You need to decide what question(s)' about the data that is stored in the array, would you like to answer. You will need to code the LINQ necessary to provide these results and then display the results in a well formatted output. To get you started: Look at the four available fields (From To). Which ones do you want to include in your output (Select)? Do you want to include all of the records (Where)? Should the records be sorted in any specific order (Order by)? Do you want to create any new field(s) to include with your output (et)? Do you want to remove duplicate output values if they exists (Distinct)? Now... Be Creative but make sure your output Header line provides a description of the output that I will be looking at. Regim Presente daily Rentals (current subsin pt - 1) "Equipment Summary Query" Button Click Event: This event should be run after the daily rental array has been resized to remove unused/empty elements. Validate that the daily rental array isn't empty. Using a LINQ, generate a result from the daily rental array that includes all records: Order the results by Equipment Rented in descending hours order. O include the Equipment Rented, Order Cost, and the Rental Hours in the query results. Using a For Loop, generate the output shown below that includes: o Meaningful Header O Blank Line O First Equipment Type: . All records for this type of equipment. Subtotal for Cost generated by this equipment. Blank Line o Second Equipment Type: . All records for this type of equipment. Subtotal for Cost generated by this equipment. Blank Line Third Equipment Type: . All records for this type of equipment. - Subtotal for Cost generated by this equipment. Blank Line Total Cost for all Daily Rentals - Remember to clear the listbox before adding any new output and make it look good

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

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions