1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
notka56 [123]
2 years ago
13

Write the implementation of a class Cse20 Topic that represents a topic in the cse20 class. The class should implement the init

function, getters, and override the str and add functions.
Computers and Technology
1 answer:
Kay [80]2 years ago
8 0

Answer:

class Cse20_topic:

   def __init__(self, title, length):

       self.title = title

       self.length = length

   def get_length(self):

       return self.length

   def get_title(self):

       return self.title

   def get_length_in_days(self):

       return self.length*7

   def __str__(self):

       return f'Title: {self.title}, length: {self.length}'

   def __add__(self, other):

       return self.length+other.length

Explanation:

The python program above defines the class Cse20 which is used to create a topic ( instance of the Cse20 object). The getter methods like the get_lenght, get_title and get_length_in_days return the length of a topic object, the title of the topic and the topic length in days respectively while the __str__ and __add__ methods overrides the string object and addition of topic length respectively.

You might be interested in
Considering current online newspaper editions and the characteristics of digital age media, how do you think newspaper design mi
NeX [460]
One way that a newspaper design may change in the future is that they will only be available in an interactive online edition. The correct answer is B. <span />
6 0
3 years ago
What is Converting digital data and see information to display screen can use to create an image?
aksik [14]

Answer:

Most displays in current use employ cathode ray tube ( CRT ) technology similar to that used in most television sets. The CRT technology requires a certain distance from the beam projection device to the screen in order to function.

4 0
2 years ago
9) Which date is assigned the serial number of 1?
goldenfox [79]

9) Which date is assigned the serial number of 1?

A. January 1, 1700

B. January 1, 2000

  • C. January 1, 1900

D. January 1, 1800

7 0
2 years ago
Read 2 more answers
Chase lives in Oregon but works for a company that is located in Florida. What business trend is this an example us?
shtirl [24]

Answer:

The business trend wherein Chase works for a company that is located in Florida while he is living in Oregon is an example of remote workforce business trend.

Remote workers are those workers who does their job outside of a customary type of office.

8 0
3 years ago
Read 2 more answers
What does the format painter button in excel do
wlad13 [49]
The format painter button in excel copies formatting from one place and it applies it to another
7 0
3 years ago
Other questions:
  • What is the difference between HTML and CSS? * 1. CSS is a markup language unlike HTML 2. HTML is a backend technology and CSS i
    7·1 answer
  • You are using a crimper to attach an RJ-45 connector to a Cat 6 UTP cable. You need to use the T568A standard to connect the ind
    6·1 answer
  • A computer abuse technique called a ____ involves inserting unauthorized code in a program, which, when activated, may cause a d
    11·1 answer
  • Choose the sentences that describe techniques of formatting text.
    12·1 answer
  • The _____ feature automatically corrects typing, spelling, capitalization, or grammar errors as you type them.
    13·1 answer
  • Which attack intercepts communications between a web browser and the underlying computer?
    10·1 answer
  • Matts has finished running some security automation scripts on three newly deployed Linux servers. After applying intrusion dete
    7·1 answer
  • For Internet Protocol (IP) v6 traffic to travel on an IP v4 network, which two technologies are used
    15·1 answer
  • Write a program that reads an integer, a list of words, and a character. The integer signifies how many words are in the list. T
    14·1 answer
  • What is the most used gaming keyboard in 2022?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!