السلام عليكم ورحمة الله وبركاته
بدات احل برنامج بلغة الجافا
ولاكن وقفت وماعرفت اكمل اتمنى المساعده
هذا السوال
___________
1. Write a Java class that represents a class Trip.
2. Write data members for the above class
· data member that stores trip departure place
· data member that stores trip arrival place
· data member that stores trip cost
· data member that stores trip travel time
· data member that determines whether flight is domestic or not
3. Write a set and get method for each data member
4. Write a main method that will do the following when the program is run
· create an object of the class trip
· Fill out the trip data members with any of your trip data using the set methods
· print the trip data in the following format
Welcome to my first Program
----------------------------------
I want to tell you about my trip, I traveled
from:
to:
and the trip cost was:
The trip took time of:
It was domestic (y/n):
________________________
ودا الحل اللي بداته وماكملته
كود:
public class Trip{
String trip departure place;
String trip arrival place;
Flot trip cost;
Flot travel time;
Boolean determines whether flight is domestic or not;
}