In this program, we will create a class Student that contains 3 data members id, name, and fee. Then we will define the initialize() method to initialize the data members and we will also create a PrintStudentInfo() method to print student information.
Ruby program to create a class with data members and initialize using initialize() method
belongs to collection: Ruby Classes & Objects Programs
total answers (1)