Question: Write a class def for a class called 'flight'. It should have 5 properties and 2 methods. Instantiate two instances of the flight and call

  1. Write a class def for a class called 'flight'. It should have 5 properties and 2 methods. Instantiate two instances of the flight and call both methods. The constructor should take flightNumber as an arg.
    1. Methods: setDeparture(), setArrival()
    2. Properties: arrivalTime, departureTime, origin, destination, flightNumber
  2. Write a class def for a class called 'journal'. It should have 4 properties and 4 methods. Two of the methods should take at least one argument.
    1. Instantiate the class and call two methods.
    2. Methods: addText, addDate, addUsername, getText
    3. Properties: text, date, username, mood

3. Write a class def for a class called 'graph'. It should take a name as a constructor arg and have 2 methods: addY() which takes a list of 10 ints as arguments. A 2nd method show() should return an ascii graph of the data as a string like:

 Write a class def for a class called 'flight'. It should

4. Create a class def for a class called 'weatherReport'. The constructor should take a city and state as arguments. The class should have 3 methods to set the temp, wind (speed and direction) and conditions. Condition should be one of the following: clear, partly cloudy, overcast, rain, snow. The class should have a method called getWarnings. The method should return a list of warnings based on the conditions. Here are the warnings:

  • wind > 40mph = High wind warning
  • temp > 95 = High heat warning
  • temp
  • temp 45 and condition snow = blizzard warning

Please use programming language python

000000 000000 0000 00 00 ooooooooooooo000000000000000000000000000000000 0000 00000000000000000000000000000000000000 0000000000000000000000000000000000 000000000000 00000000000000000000 000000000000 000000 00000000 00 000000000000 00000000 000000000000 00 00 000000000000 0000000000 00 0000 0000 00 oo oo 00 00 0000000000 0000000000 0000000000 00 000000 00 00 0000 00 00 00

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!