Tecno Mobile Phones, Huawei, Firmware Flash File, Android Jelly Bean, Facebook Page, iPhone Apple, Symphony Firmware, Lava iris, samsung

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# - technological developments continue to grow rapidly, old technologist replaced with the latest, on the blog Tecno Mobile Phones we will discuss various updated technology from various brands around the world, well now we will discuss first about C# Program to find Student GPA and CGPA || Concept of ENUM in C# we collect a lot data from various reliable sources to make this article, please read:

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);
}




just so much information about 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 adding insight about the latest gadget technology

you just read the article about C# Program to find Student GPA and CGPA || Concept of ENUM in C# and can you bookmark or share with link https://ghchjgv.blogspot.com/2014/01/c-program-to-find-student-gpa-and-cgpa.html so thank you.

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#

  • C# Program which calculated factorial to prime functionC# Program which calculated factorial to prime functionProgram Statement:Write two functions max(int,int) and prime(int). max function will take two arguments and w ...
  • C# Program to Print Triangle in Square C# Program to Print Triangle in SquareProgram Statement:Write a program which display the following output on the screen.####$#######$#$#####$###$###$#####$#$#######$Sol ...
  • C# Program to check number is prime or composite C# Program to check entered number is prime or composite Program Statement:Write a program that takes an integer as an input from user and prints if it is a prime o ...
  • C# Program to print Rectangle $C# Program to print Rectangle $Program Statement:Write a program using for loop which prints the following output on the screen.$$$$$$$$$$$$         ...
  • Program to Print Armstrong numbers in C#C# Program to Print out all Armstrong numbers between 1 and 500Program Statement:Write a program to print out all Armstrong numbers between 1 and 500. If sum of cubes of ...

0 komentar:

Post a Comment