ردود الذكاء الاصطناعي
سؤالك:
إجابة الشبكة العصبية:
class Ship:
def __init__(self, name, capacity, speed):
self.name = name
self.capacity = capacity
self.speed = speed
def display_info(self):
print(f"Ship Name: {self.name}")
print(f"Capacity: {self.capacity}")
print(f"Speed: {self.speed}")
print("")
class Freight(Ship):
def __init__(self, name, capacity, speed, cargo_type):
super().__init__(name, capacity, speed)
self.cargo_type = cargo_type
def display_info(self):
super().display_info()
print(f"Cargo Type: {self.cargo_type}")
print("")
class Tugboat(Ship):
def __init__(self, name, capacity, speed, power):
super().__init__(name, capacity, speed)
self.power = power
def display_info(self):
super().display_info()
print(f"Power: {self.power}")
print("")
class Cruise(Ship):
def __init__(self, name, capacity, speed, luxury_level):
super().__init__(name, capacity, speed)
self.luxury_level = luxury_level
def display_info(self):
super().display_info()
print(f"Luxury Level: {self.luxury_level}")
print("")
# Example usage
freight_ship = Freight("Cargo Ship", 5000, 30, "Containers")
freight_ship.display_info()
tugboat = Tugboat("Tugboat 1", 100, 10, "High")
tugboat.display_info()
cruise_ship = Cruise("Luxury Cruise", 2000, 40, "High")
cruise_ship.display_info()
يرجى ملاحظة: قد لا تكون الإجابات المقدمة بواسطة الذكاء الاصطناعي دقيقة دائمًا. لا تعتمد عليها في القضايا الحساسة مثل الطب، القانون، الأمور المالية أو القضايا الأمنية. من الأفضل دائمًا الرجوع إلى المتخصصين المؤهلين عند اتخاذ القرارات المهمة. إدارة الموقع غير مسؤولة عن المحتوى الذي يتم إنتاجه تلقائيًا.