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]
3 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]3 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
If Asa changes the text to bold, he has changed the style. True False
LiRa [457]
True because if you were to bold a text, you have presented that the following text is more important or exemplified. 
4 0
4 years ago
Read 2 more answers
g Create a public non-final generic class called YourSimpleLinkedList. You should extend SimpleLinkedList which is parameterized
larisa86 [58]

Answer:

See explaination

Explanation:

class YourSimpleLinkedList<E> extends SimpleLinkedList<E> {

public boolean search(E value) {

if (value == null)

throw new IllegalArgumentException();

Item temp = start;

while (temp != null) {

if (temp.value.equals(value))

return true;

temp = temp.next;

}

return false;

}

}

3 0
3 years ago
Codehs python 4.7.6 Powers of Two <br> it says I'm wrong because I need
Finger [1]

Following are the program to calculate the power of two:

Program Explanation:

  • Defining an integer variable "i" that hold an integer value.
  • Defining a for loop that checks "i" value in between 20, inside this it calculates power of two.
  • At the last use print method to print its value.

Program:

i=1#holding integer value in i

for i in range(20):#defining a for that starts 1 to 20    

   i = 2 ** i#calculate power of 2 in i variable

   print(i)#print value

Output:

Please find the attached file.  

Learn more:

brainly.com/question/23170807

8 0
2 years ago
Read 2 more answers
All of the following are tips for the Aspire English tests except
Alchen [17]

Answer:

A. there is no need to consider the elements of writing in the

underlined portion of a passage.

Explanation:

The options are:

A. there is no need to consider the elements of writing in the

underlined portion of a passage.

B. reread the sentence using your selected answer.

C. determine the best answer.

D. read and consider all of the answer choices before choosing the

one that best responds to the question.

All the options are correct given above except for the first option. The first option is not correct as it is not the right idea to not consider the elements of writing in the underlined portion of a passage. We just cannot neglect this. And hence, the correct option is A.

5 0
3 years ago
You need a version of usb technology that will support older usb devices, of which you have many, as well as newer ones. what wo
tiny-mole [99]
The answer you're looking for might be "backwards-compatible".
7 0
4 years ago
Other questions:
  • A server-side extension ________________. provides its services to the web server in a way that is totally transparent to the cl
    13·1 answer
  • Akira has trouble reading what is on the computer screen and sometimes seeing pictures on websites. As her friend, you explain t
    8·1 answer
  • 13) What are the benefits and detriments of each of the following? Consider both the systems and the programmers’ levels. a. Sym
    14·1 answer
  • This procedure protects against the loss of data
    5·1 answer
  • The data in a database management system that identifies the names of​ tables, fields in each​ table, and the properties of each
    13·2 answers
  • 40 is 20 % percent of what?​
    9·1 answer
  • Monica wants insert a cover page for her report. She needs to be sure her insertion point is at the beginning of the report.
    7·1 answer
  • MENCIONA ¿POR QUÉ SURGE EL CIVISMO TECNOLOGICO?
    6·1 answer
  • Hey guys!
    5·2 answers
  • LAB: Parsing dates in M/D/Y format
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!