Grades App: Calculating Student Averages and Exam Medians, Assignments of Programming Languages

The development of a grades app that allows users to input student names and exam grades, and then calculates the semester average for each student as well as the median for each exam. The app utilizes one-dimensional and two-dimensional arrays to store the student names and exam grades, respectively. The user interface includes various controls such as textboxes, labels, and listboxes to facilitate data input and display the results. The step-by-step development procedure and the program code methods are provided, demonstrating the implementation of the key functionalities required by the given assessment question.

Typology: Assignments

2023/2024

Uploaded on 05/11/2024

hluks-maduna
hluks-maduna 🇿🇦

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Assignment 1 Review
Chosen Question: Assessment 2-3
Initials & Surname: LB MADUNA, Student Number: 61097004, ID No. 9294305932088
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Grades App: Calculating Student Averages and Exam Medians and more Assignments Programming Languages in PDF only on Docsity!

Assignment 1 Review

Chosen Question: Assessment 2- 3

Initials & Surname: LB MADUNA, Student Number: 61097004, ID No. 9294305932088

Table of Contents

 - Student Number: - ID No. 
  • Table of Contents Table of Contents
    • Assignment 1 Review:
    • Controls that comprise the user interface.
    • Form Grades Step by step development procedure.
    • Programme Code methods as per selected Question.

Student Number: 61097004 ID No. 9294305932088 Answers Controls that comprise the user interface.

Object Property Settings

txtName Text^ Input Name

txtExam1 Double^ Input Exam1 Results

txtExam 2 Double^ Input Exam^2 Results

txtExam 3 Double^ Input Exam^3 Results

btnAdd Text^ Clears^ data for new data

btnDisplay_Report Text^ Displays all Exam Marks and

Medians

listBoxStudent Text^ Displays and houses the

Students’ Exam Averages

ListBoxExamMedians Text^ House and displays Exam

Medians

lblName Text^ Label of^ “Name”^ on the

form

lblExam :1 Text^ Label of^ “Exam 1”^ on the

form

lblExam : 2 Text^ Label of^ “Exam^2 ”^ on the

form

lblExam : 3 Text Label of “Exam 3 ” on the

form These are all the controls, used to create the user interface making it easy or user friendly for app interaction during the use of the app itself.

Student Number: 61097004 ID No. 9294305932088 Form Grades Step by step development procedure. Steps Procedure Step: (^1) • Launch the Visual Studio Application Tool. Step: (^2) • Click on “create a new project”. Step: 3 • Click on “Windows Form App” then click “Next”. Step: (^4) • Type your project name in the project name input box on current project the name “Grades_App” then click “Next”. Step: 5 (^) • Click the “Create” button. Step: 6 Application form will launch and once done add the following objects:

  • Label for Name.
  • Textbox for Name.
  • Align them next to each other respectively. Step: 7 (^) • Set the textbox name to “txtName” under properties.
  • Set the label name to “lblName” under properties.
  • Set the label text to “Name” under properties. Step: 8 Add the following object:
  • Label and set the text name to “Exam: 1”.
  • Textbox and set the text name to “txtExam1”.
  • Label and set the text name to “Exam: 2 ”.
  • Textbox and set the text name to “txtExam 2 ”.
  • Label and set the text name to “Exam: 3 ”.
  • Textbox and set the text name to “txtExam 3 ”. Step: 9 Add the following Objects:
  • 2 List Boxes and do the following changes to each property’s:

Student Number: 61097004 ID No. 9294305932088 Programme Code methods as per selected Question.

'Apply the following Imports to the Code: Imports System.ComponentModel.Design Imports System.Net.Sockets Imports System.Reflection.Metadata.Ecma Imports System.Runtime.CompilerServices Imports System.Windows.Forms.Design

'Variables declarations Dim StudentName(15) As String Dim Exam1(2, 2) As Double Dim Exam2(2, 2) As Double Dim Exam3(2, 2) As Double Dim Median As Double Dim Student_Average As Double Dim Display As String Dim Total_Marks As Double Dim n As Integer = 3

'The statement displays as soon as the app is launched Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load ListBoxStudent.Items.Add("Students' Semester Average") End Sub

Private Sub btnAddStudent_Click(sender As Object, e As EventArgs) Handles btnAddStudent.Click 'Clearing the previous inputs for the new ones to be furnished txtName.Text = " " txtExam1.Text = " " txtExam2.Text = " " txtExam3.Text = " " End Sub

Student Number: 61097004 ID No. 9294305932088

Private Sub Command1_click() 'One Dimensional Array For Names. StudentName(0) = txtName.Text StudentName(1) = txtName.Text StudentName(2) = txtName.Text StudentName(3) = txtName.Text StudentName(4) = txtName.Text StudentName(5) = txtName.Text StudentName(6) = txtName.Text StudentName(7) = txtName.Text StudentName(8) = txtName.Text StudentName(9) = txtName.Text StudentName(10) = txtName.Text StudentName(11) = txtName.Text StudentName(12) = txtName.Text StudentName(13) = txtName.Text StudentName(14) = txtName.Text End Sub

Private Sub Command2_click() 'Two Dimensional Array For Marks. Exam1(0, 0) = txtExam1.Text Exam2(0, 1) = txtExam2.Text Exam3(0, 2) = txtExam3.Text End Sub

Private Sub btnDisplayReport_Click(sender As Object, e As EventArgs) Handles btnDisplayReport.Click 'Assigns and stores the input exam values respectively into their textboxes Exam1(0, 0) = txtExam1.Text Exam2(0, 1) = txtExam2.Text Exam3(0, 2) = txtExam3.Text 'Formular for Calculating the Total Marks value respectively