Convert The Following Code Into PHP
Convert The Following Code Into PHP
Private Members
A data member Flight number
A data member Destination
A data member Distance
A data member Fuel
A member function CALFUEL() to calculate the value of Fuel as per the following criteria
Distance Fuel
<=1000 500
more than 1000 and <=2000 1100
more than 2000 2200
Public Members
A function FEEDINFO() to allow user to enter values for Flight Number, Destination, Distance
& call function CALFUEL() to calculate the quantity of Fuel
A function SHOWINFO() to allow user to view the content of all the data members
Question 2:
Convert the following code into php
class PPP
{
int H:
protected :
int S;
public :
void input (int);
void out();
};
After converting the above code into php. set the value H of class ppp by using the object of
class RRR
HINT:
You must create an object of RRR class and by using that object you must set the any value of
private data member H in class PPP.