Check - Circle: Thumb - Up Thumb - Down
Check - Circle: Thumb - Up Thumb - Down
Check - Circle: Thumb - Up Thumb - Down
Roll Num, Average Marks Member functions: Read and Write Use the above information to read
and write information of two students.
check_circle
Expert Answer
thumb_up
thumb_down
Step 1
/***********************student.php***********************/
<?php
class student
{
public $name;
public $rollNo;
public $avgMarks;
function set_name($name) {
$this->name = $name;
}
function get_name() {
return $this->name;
}
function set_rollNo($rollNo) {
$this->rollNo = $rollNo;
}
function get_rollNo() {
return $this->rollNo;
}
function set_avgMarks($avgMarks) {
$this->avgMarks = $avgMarks;
}
function get_avgMarks() {
return $this->avgMarks;
This study source was downloaded by 100000849659459 from CourseHero.com on 07-07-2022 10:27:02 GMT -05:00
https://www.coursehero.com/file/95397231/Write-a-PHP-program-to-create-class-student-with-following-specification-Data-membersdocx/
}
function read($name,$rollNo,$avgMarks){
$this->set_name($name);
$this->set_rollNo($rollNo);
$this->set_avgMarks($avgMarks);
}
function write(){
echo "<br>";
echo "Student Name : " . $this->get_name();
echo "<br>";
echo "Student Roll Number : " . $this->get_rollNo();
echo "<br>";
echo "Student Average Marks : " . $this->get_avgMarks();
echo "<br>";
}
}
This study source was downloaded by 100000849659459 from CourseHero.com on 07-07-2022 10:27:02 GMT -05:00
https://www.coursehero.com/file/95397231/Write-a-PHP-program-to-create-class-student-with-following-specification-Data-membersdocx/
This study source was downloaded by 100000849659459 from CourseHero.com on 07-07-2022 10:27:02 GMT -05:00
https://www.coursehero.com/file/95397231/Write-a-PHP-program-to-create-class-student-with-following-specification-Data-membersdocx/
Powered by TCPDF (www.tcpdf.org)