Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What are some career development methods?

Answered: 1 week ago

Question

7. Senior management supports the career system.

Answered: 1 week ago