Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Start a new Visual Studio project and name it GradeApp a. Make sure your proj

ID: 3585061 • Letter: 1

Question

1. Start a new Visual Studio project and name it GradeApp

a. Make sure your project is a web project

b. Make sure it is using C#

2. Add a new folder and name it Grades_Logic

3. Inside this new folder create a new web form called “Grades”

4. Add a label to hold text “Enter Grade”

5. Add a text field in front of the label to receive the grade

6. Add another label in a new line to display the text “Participation”

7. Place a drop-down list in front of this label containing the following:

a. Excellent Participant

b. Very Good participant

c. Good participant

d. Fair participant

e. Poor participant

f. Did not participate

8. Add a button in a new line called submit labeled “Submit Evaluation”

9. In a new line below the button add a label to display the output with no text in it

10. Create a code behind to display the final evaluation based on the score entered in the text box and the participation selected from the drop-down list.

11. Final evaluation should be “Excellent”, “Very Good”, “Good”, “Fair”, or “Poor”

12. The logic should work as the following:

a. The grade should present 90% of the total evaluation

b. The participation should be 10% of the total evaluation

i. Excellent Participant = 100% of participation weight

ii. Very Good participant = 90% of participation weight

iii. Good participant = 80% of participation weight

iv. Fair participant = 70% of participation weight

v. Poor participant = 50% of participation weight

vi. Did not participate = 0% of participation weight


13. The final evaluation will be as the following:

a. Excellent = 91% - 100% of total grade

b. Very Good = 81% - 90% of total grade

c. Good = 71% - 80% of total grade

d. Fair = 60% - 70% of total grade

e. Poor is anything below 60% of total grade

Explanation / Answer

Hey, I am pasting the two files here, one is frontend, another is backend. I do not have enough options to send you the Visual Studio project.

Grades.aspx //this file is frontend

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Grades.aspx.cs" Inherits="GradeApp.Grades_Logic.Grades" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label id="grade" AssociatedControlId="gradebox" Text="Enter Grade" runat="server" /> <asp:TextBox id="gradebox" runat="server" />%
<br />
<asp:Label id="participation" AssociatedControlId="ddlParticipation" Text="Participation" runat="server" />
<asp:DropDownList id="ddlParticipation" runat="server" TabIndex="7">
<asp:ListItem Selected="True">Please Select</asp:ListItem>
<asp:ListItem>Excellent Participant</asp:ListItem>
<asp:ListItem>Very Good participant</asp:ListItem>
<asp:ListItem>Good participant</asp:ListItem>
<asp:ListItem>Fair participant</asp:ListItem>
<asp:ListItem>Poor participant</asp:ListItem>
<asp:ListItem>Did not participate</asp:ListItem>
</asp:DropDownList>
<br />
<asp:Button ID="evaluate" Text="Submit Evaluation" runat="server" />
<br />
<asp:Label id="final" Text="" runat="server" />
</div>
</form>
</body>
</html>

Grades.aspx.cs //this is backend logic file

using System;

namespace GradeApp.Grades_Logic
{
public partial class Grades : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}

protected void Evaluate(object sender, EventArgs e)
{
var grades = float.Parse(gradebox.Text);
//90% weight
grades = grades * 0.9f;

var sel = ddlParticipation.Items[ddlParticipation.SelectedIndex].Value;
float part = 0;
//10% weight
switch(sel)
{
case "Excellent Participant":
part = 10;
break;
case "Very Good participant":
part = 9;
break;
case "Good participant":
part = 8;
break;
case "Fair participant":
part = 7;
break;
case "Poor participant":
part = 5;
break;
case "Did not participate":
part = 0;
break;
}
var finVal = grades + part;
if (finVal >= 91)
final.Text = "Excellent";
else if (finVal >= 81)
final.Text = "Very Good";
else if (finVal >= 71)
final.Text = "Good";
else if (finVal >= 60)
final.Text = "Fair";
else
final.Text = "Poor";
}
}
}

//Please comment if you need further help while creating the project.