Write the code you would place in the AverageButton click event on your form to call the Average query and the Highest query and display in a DifferenceLabel, the difference between the highest age of a student and the average age.

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter3: Performing Calculations With Formulas And Functions
Section: Chapter Questions
Problem 3.9CP
icon
Related questions
icon
Concept explainers
Question
C sharp
Table: Student (the headers are the field names in the Students table)

StudentID
Name
Age
Gender
ProgramID
791
Stephanie Brown
19
Female
BCS
236
Shannon Dawn
25
Female
BA
618
Geoff Berg
24
Male
ARET
256
Andrew Schilling
22
Male
BSC
902
Gary Sang
23
Male
DAAD

Note: There is a StudentDataSet with a Student table, a StudentTableAdapter, a StudentBindingSource, and a StudentDataGridView control on the form.

Note: There is an Average query, named Average, that returns the average age of the student from the Student table.

Note: There is also Max query, named Highest, that returns the highest age of the student from the Student table.

Write the code you would place in the AverageButton click event on your form to call the Average query and the Highest query and display in a DifferenceLabel, the difference between the highest age of a student and the average age. 
 
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Query Syntax
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning