Knowee
Questions
Features
Study Tools

Create a class Student with  data members name,regno,CGPADefine a default constructor and read the values of the data members from the user.Define a member function inside the class that will print “eligible for placement “ if CGPA is greater than or equal to 8;else prints “ not eligible”.Create object and call the member function and print the results.Sample InputAkash12347Sample Output1234 Akash is not eligibleInputOutputProcessing InvolvedSolution AlternativesAlgorithm/ Pseudocode

Question

Create a class Student with  data members name,regno,CGPADefine a default constructor and read the values of the data members from the user.Define a member function inside the class that will print “eligible for placement “ if CGPA is greater than or equal to 8;else prints “ not eligible”.Create object and call the member function and print the results.Sample InputAkash12347Sample Output1234 Akash is not eligibleInputOutputProcessing InvolvedSolution AlternativesAlgorithm/ Pseudocode

...expand
🧐 Not the exact question you are looking for?Go ask a question

Solution

Here is the Python code for your requirement:

class Student:
    def __init__(self):
        self.name = input("Enter the name of the student: ")
        self.regno = input("Enter the registration number of the student: ")
        self.CGPA = float(input("Enter the CGPA of the student: "))

    def check_eligibility(self):
        if self.CGPA >= 8:
            print(self.regno, self.name, "is eligible for placement")
        else:
            print(self.regno, self.name, "is not eligible")

# Create object and call the member function
student1 = Student()
student1.check_eligibility()

In this code, we first define a class Student with a constructor that takes inputs from the user for name, regno, and CGPA. We then define a method check_eligibility that checks if the CGPA is greater than or equal to 8. If it is, it prints that the student is eligible for placement, otherwise it prints that the student is not eligible. Finally, we create an object of the class and call the check_eligibility method.

This problem has been solved

Similar Questions

Single File Programming QuestionPlacement EligibilityA company, ABC Corp, has set specific eligibility criteria for its internship program. Applicants must have a minimum Grade Point Average (GPA) of 6.0 and must score at least 50.5 in the initial screening test. Write a program to determine if a student qualifies for the internship based on these criteria.Note: Use the Nested ternary operator.Input format :The first line of input consists of an integer m, representing the CGPA value.The second line of input consists of floating point number s, representing the initial screening test score.Output format :The output prints either "Eligible for Next Round", "Not Eligible" or "Try again..." based on the conditions.Refer to the sample output for the formatting specifications.Code constraints :In the given scenario, the test cases fall under the following constraints:4 ≤ m ≤ 1020.0 ≤ s ≤ 100.0Sample test cases :Input 1 :786.1Output 1 :Eligible for Next RoundInput 2 :460.1Output 2 :Not EligibleInput 3 :734.1Output 3 :Try again...Input 4 :10100.0Output 4 :Eligible for Next RoundNote :The program will be evaluated only after the “Submit Code” is clicked.Extra spaces and new line characters in the program output will result in the failure of the test case.

Enter the student details using constructors with arguments. Then find the total marks of each student. If it is greater than 500 print pass ,else print fail.

Write a C++ Program and Subsequent Pseudo Code to print the student details applied for VITEE Examinations. Define a Class STUDENT, with required  Private Data members to store the information about a student. Now define atlease one nonmember function as a friend  to a class STUDENT either  to read or print the student details.Input : Student_No, Student_Name, Student_Age, Student_Sex, Student_Plus12Marks, Student_Address, Student_MobleNo.Output : Student_No, Student_Name, Student_Age, Student_Sex, Student_Plus12Marks, Student_Address, Student_MobleNo, Eligible/Not EligibleNote : Student_Name Contains F_Name, M_Name, L_Name; and if Student_Plus12Makrs is > 800 then Print "Eligible" otherwise print "Not Eligible"

You are given 3 lines of input. In the first two lines you have to scan space separated details of the first and the second person respectively in the order: name, admission number, class, percentage, pass result, route number and blood group. Now you will be given an admission number, and you have to return the name, percentage and route of that person in a single line (space-separated). If the admission number is not present, return the error message 'No entry found'. Note that you have to make three classes, a student class(containing name, admission number, and class) and a report class that inherits the student class (and has the percentage and pass result) and a bus class that inherits the student class (and has the route number and blood group). Make appropriate methods where needed and in the driver class, make appropriate calls to these methods for the required output.Sample test case:Input:A 1 9 99 yes 27 B+B 2 10 88 no 28 A+2Output:B 88 28 Explanation: The person whose admission number is 2 has the name B, percentage 88 and route number 28.

Develop a java application to implement the following: Create a class named " MarkSheet" and declare two variables Name ,CGPA. And also Define two methods Readdata(), Displaydata().Your program shoud read data for three students and display the values using array of objects. Sample output Nithin 9.6 Amrith 8.9 Sonu 9.0

1/2

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.