Assuming 20 minutes if that, pretty easy to make even for beginners.Hassam said:that's pretty cool. How long did you spend on this?
Nokia said:Or you can just wait for your grades and pay...
Hassam said:that's pretty cool. How long did you spend on this?
Junior said:I don't even get what you're trying to say, these are things I coded in C# for a class I'm doing.
I'm a beginner so it took me about 3 hours just to make these, the calculations for the buttons are a bitch.
Odus said:Ooookay I see a UI here, drag 'n drop - not very hard. How about some code?
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Student_Grade_Processor
{
public partial class GradeProcessor : Form
{
public GradeProcessor()
{
InitializeComponent();
}
// calculates the average grade, letter grade, and quiz dropped
private void btnCalculate_Click(object sender, EventArgs e)
{
double quiz1; // quiz number one grade
double quiz2; // quiz number two grade
double quiz3; // quiz number three grade
double midTerms; // midterm exam grade
double finals; // final exam score grade
double courseGrades; // quiz number one grade
quiz1 = Convert.ToDouble(textBox1.Text);
quiz2 = Convert.ToDouble(textBox2.Text);
quiz3 = Convert.ToDouble(textBox3.Text);
midTerms = Convert.ToDouble(textBox4.Text);
finals = Convert.ToDouble(textBox5.Text);
double[] quizScores = { quiz1, quiz2, quiz3 };
// determines lowest score out of the quizzes
double lowestScore = quizScores.Min();
string quizDropped = "";
if (lowestScore == quiz1)
{
quizDropped = "#1";
}
else if (lowestScore == quiz2)
{
quizDropped = "#2";
}
else
{
quizDropped = "#3";
}
double quizGrades = (((quiz1 + quiz2 + quiz3) - lowestScore) / 2); // calculates average quiz grade
courseGrades = ((quizGrades * 0.3) + (midTerms * 0.3) + (finals * 0.4)); // calculates the total grade of all quizzes and exams
// assigns a letter grade depending on the grade
char letterGrade = 'X';
if (courseGrades > 89)
{
letterGrade = 'A';
}
else if (courseGrades > 79)
{
letterGrade = 'B';
}
else if (courseGrades > 69)
{
letterGrade = 'C';
}
else if (courseGrades > 59)
{
letterGrade = 'D';
}
else if (courseGrades < 59)
{
letterGrade = 'F';
}
// the following displays the results from the calculations
lblAverage.Text = Convert.ToString(courseGrades); // displays the course average
lblLetter.Text = Convert.ToString(letterGrade); // displays a letter grade depending on the course average
lblDroppedQuiz.Text = Convert.ToString(quizDropped); // displays which quiz was dropped out of the 3
}
}
}
Static said:All I see is photos of a form, show us the code.
I read the OP, not the comments..Naughty said:If you read the thread, you would see that there is a code provided in the last post of the page one.
Static said:I read the OP, not the comments..
well first of all, if this is his first program ever, he should most definitely post the source so people can give tips and what not.Naughty said:Don't complain about not getting the code if it was provided, all it takes is to quickly read through comments. (Unless there is a dozen replies.)