7.0T Plane - require\/input_functions class Plane attr_accessor:id:name:origin:destination def

7.0T Plane - require/input_functions class Plane...

This preview shows page 1 - 2 out of 2 pages.

require './input_functions' class Plane attr_accessor :id, :name, :origin, :destination def initialize(id,name,origin,destination) @id=id @name=name @origin=origin @destination=destination end end def read_plane id= read_integer ("Enter plane id: ") name=read_string("Enter flight name: ") origin=read_string("Enter origin airport: ") destination=read_string("Enter destintion airport: ") plane = Plane.new(id,name,origin,destination) end def read_planes count=read_integer("Enter number of records")

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture