Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write the C + + program according to following scenario: Write a C + + program that will have a user defined data type Student.
Write the program according to following scenario:
Write a C program that will have a user defined data type Student. Follow the given
details and use structure to create it
The Student structure includes the attributes id name, cgpa, numberOfCreditsCompleted
Implement the following methods within the struct
setData for setting all the student information and display for displaying the student details.
Additionally, include one operational method called getScholarshipPercent, this function
is used to check whether the student is applicable for scholarship or not. The student is
eligible for a scholarship if their cgpa is greater than or equal to and their
numberOfCredits exceeds The student is eligible for a scholarship if their cgpa
is greater than or equal to and their numberOfCredits exceeds Otherwise, the
percentage is The percentage of the scholarship is returned by the function.
In main function create an instance of Student structure and use setData to initialize the
information about the student. After that Check whether the student is applicable for
scholarship or not. Finally, print the information by using display function.
Do the same thing using class Student
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started