What's new

Pa check naman po code ko sa Java/UML. Please

PHC - NoName

Honorary Poster
Joined
Sep 27, 2021
Posts
439
Reaction
78
Points
229
Beginner lang po nag try lang po. Ganto poba yun? Pahelp naman po. Ayan pong nasa picture yung gagawin. Thank you po.

Public class Fare {

Private float fare;
Public set fare() ;
Public get fare() ;
}


Public class Senior Fare extends fare {

Private set fare(30.00)
Private get fare(24.00)
}


Public class Student Fare extends fare {

Private set fare(30.00)
Private get fare(25.5)
}


Thank you po.

Screenshot_20220331_200154.jpg
 

Attachments

1. Define the proper getter and setter for class Fare. Use the proper syntax for defining the method.
2. Define the class properly on senior fare. Space is not allowed when defining the name of the class. Please do research on this.
3. Use the get and set methods from the parent class (Fare) to set a new values of the child classes (SeniorFare, StudentFare)
 
1. Define the proper getter and setter for class Fare. Use the proper syntax for defining the method.
2. Define the class properly on senior fare. Space is not allowed when defining the name of the class. Please do research on this.
3. Use the get and set methods from the parent class (Fare) to set a new values of the child classes (SeniorFare, StudentFare)
Okay po, thank you po.
 

Similar threads

Back
Top