Innaz Review, Samsung Galaxy, price and specifications, Flash Android, Games For Your Apple, Jailbreak Tool For iOS, IMEI Unlock Method

Jumat, 17 Januari 2014

C# Program to find Student GPA and CGPA || Concept of ENUM in C#

C# Program to find Student GPA and CGPA || Concept of ENUM in C# - In the past, when I started to start blogging, many thoughts disturbed me. I want to have a blog with a nice and interesting look. I am constantly looking for basic tutorials from some web and blogs on the internet. And thankfully, one by one I started to do it, and of course have to go through some confusion process first, but the most important of a blog that is content, yes on the blog Innaz Review we will discuss a lot of information about gadgets that are very in need by you, now we will discuss first about C# Program to find Student GPA and CGPA || Concept of ENUM in C# please refer to the information we will convey until completion:

Articles : C# Program to find Student GPA and CGPA || Concept of ENUM in C#
full Link : C# Program to find Student GPA and CGPA || Concept of ENUM in C#
Article Csharp, Article programs,

You can also see our article on:


C# Program to find Student GPA and CGPA || Concept of ENUM in C#

C# Program to find Student GPA and CGPA

Program Statement:
Create a class of student which stores characteristcs of student like studentID, studentName, studentDOB, studentRollNo, studentEmail, studentGPA of last 5 semesters and other related information of the student. (You may set some properties Boolean and some readonly)
a. Calculate the CGPA of each student using function calculateCGPA(…).
b. Student with highest CGPA will be considerd CR of the class. There should be a function which will compare the CGPA of students and will declare a student having greater CGPA as CR.
c. Program should be able to take input of 5 students from user; definitely there will be a function which will take input from the user.
d. You have to use the Setter for setting the values of the data members of the class and and Getter function for getting the values of the data members of the class. (You can use property as alternative)
e. Default value for each student GPA should be 3.0. (You have to use an array for storing GPAs of last 5 semesters. You may simply initialize the array with 3.0 in constructor).
f. All data members should be private.
g. Member functions can be public.
h. Program must be able to add two objects i.e. if we add two students then all their corresponding data members will be added one by one. (Operator Overloading).
i. Program must contain explicitly definition of copy constructor.
j. StudentID and StudentGPA of last 5 semesters must be constant or readonly.
k. Value of studentGPA of last 5 semesters must be selected from ENUM which may contain values {1.0, 2.0, 3.0, and 4.0}.

Solution:
 public void Question_45()
{
int len = 0, i = 0, count = 0 , R , copy_r;
Student[] obj;
Console.Clear();
Console.WriteLine("****A Program Calculate the Student Characteristcs****\n");
Console.Write("\nEnter the Size of Student Class : ");
len = Convert.ToInt32(Console.ReadLine());
obj = new Student[len];
for (int j = 0; j < obj.Length; j++)
obj[j] = new Student();
do
{
Console.Clear();
Console.WriteLine("****A Program Calculate the Student Characteristcs****\n");
Console.WriteLine("\n\t\t1.Input Student Data");
Console.WriteLine("\t\t2.CGPA of Student");
Console.WriteLine("\t\t3.CR of Class");
Console.WriteLine("\t\t4.Copy Contructor");
Console.WriteLine("\t\t5.Operator Overload + ");
choice = Convert.ToChar(Console.ReadLine());
switch (choice)
{
case '1':
Console.Clear();
Console.Write("\nRoll No. : " + obj[i].R);
Console.Write("\n\nEnter Name : ");
obj[i].N = Convert.ToString(Console.ReadLine());
Console.Write("\nEnter Father Name : ");
obj[i].F = Convert.ToString(Console.ReadLine());
Console.Write("\nEnter Email : ");
obj[i].E = Convert.ToString(Console.ReadLine());
Console.Write("\nEnter Date of Birth : ");
obj[i].D = Convert.ToDateTime(Console.ReadLine());
Console.Write("\nEnter Smester : ");
obj[i].Sm = Convert.ToInt32(Console.ReadLine());
obj[i].Set_GPA();
i++;
count++;
break;
case '2':
if (count != 0)
{
int loc = -1;
Console.Clear();
Console.Write("\nEnter Roll No. of Student : ");
R = Convert.ToInt32(Console.ReadLine());
for (int k = 0; k < len; k++)
{
loc = obj[k].Check(obj, R);
if (loc != -1)
{
obj[loc].CGPA();
break;
}
}
if (loc == -1)
Console.WriteLine("\nInvalid Roll No.");
count++;
}
break;
case '3':
if (count != 0)
{
Console.Clear();
obj[0].CR(obj);
count++;
}
break;
case '4':
if (count != 0)
{
Console.Clear();
Console.Write("\nEnter the No. for Copy (i.e < 5/len) : ");
copy_r = Convert.ToInt32(Console.ReadLine());
Student copy = new Student(obj[copy_r-1]);
copy.Show();
count++;
}
break;
case '5':
if (count != 0)
{
Console.Clear();
Console.Write("\nEnter 2 Object No. for Adding (i.e < 5/len) : ");
Console.Write("\nEnter the Object No. for Adding : ");
R = Convert.ToInt32(Console.ReadLine());
Console.Write("\nEnter the Object No. for Adding : ");
copy_r = Convert.ToInt32(Console.ReadLine());
obj[R] = obj[R-1] + obj[copy_r-1];
obj[R].Show();
count++;
}
break;
}
Console.Write("\nIf Run Again (Y/N) ? ");
choice = Convert.ToChar(Console.ReadLine());
if (choice != 'Y' && choice != 'y')
{
Console.WriteLine("\nSee you Next Time");
Main_Fun();
break;
}
} while (true);
}




so much information C# Program to find Student GPA and CGPA || Concept of ENUM in C#

hopefully C# Program to find Student GPA and CGPA || Concept of ENUM in C# information can provide benefits for you in determining the gadgets that fit your needs in daily life.

you just read C# Program to find Student GPA and CGPA || Concept of ENUM in C# if you feel this information is useful and want to bookmark or share it please use link https://innaz2.blogspot.com/2014/01/c-program-to-find-student-gpa-and-cgpa.html if you want more information please search on other pages this blog.

Tag : , ,
Share on Facebook
Share on Twitter
Share on Google+
Tags :

Related : C# Program to find Student GPA and CGPA || Concept of ENUM in C#

0 komentar:

Posting Komentar