class tag

88 questions


1 answers
89 views
0
Question about inheritance example of class

Define the bike class so that the following code works: The terminal tram class inherits the car class.bicycle = bicycle (2,100)Bicycle.Price100The answer to this question is class car: def__init__(se...

2 years ago

1 answers
47 views
0
How do I change the class so that it can be tied up like Set {}?

class Set: def __init__(self, my_list={}): self.my_list = my_list print(my_list)How can I implement a class that when a=Set ([1,2,3,1]) comes out as {1,2,3} and is deduplicated?

2 years ago

1 answers
70 views
0
Python class with

I made a Python code and called it with a statement.There is no function that needs to be used separately even if it is used with, so I set it as follows.By the way, if you add the self.close() comman...

2 years ago

1 answers
62 views
0
Python class exercise questions

I have to make a class named MyInteger(1)variable_01 = MyInteger(1)(2)(2)variable_02 = MyInteger(2.0)(3)(3)variable_03 = MyInteger('3')(4)(4)variable_04 = MyInteger([4,5,6])(5)(5)variable_05 = variabl...

2 years ago

1 answers
66 views
0
This is a question about c++ inheritance and factor

The result I want is Position = (300, 300), [Rectangle] Size = (100, 100) I tried to make it sloppy with the power of c++ Newbie, but it was not enough. In addition to using virtual functions, the pro...

2 years ago

1 answers
83 views
0
No suitable default constructor available

No suitable default constructor available Error appears This is one of the header files of the fruit-buying programThere's only one constructor error stuck here.class FruitSeller{private: const int AP...

2 years ago

1 answers
83 views
0
Reduce Python code How to reduce repetitive code within the pyqt5 class

Hello,I'm a beginner studying coding by myself.While programming through PYQT5, there is a repetitive code, so I want to reduce it, so I'm asking you a question because it didn't work well.class Ui_Ma...

2 years ago

1 answers
95 views
0
Abstract Class Creator Question

In the case of an abstract class, it is not created, so we know that the subclass creates and calls the constructor of the abstract class using the super method.public class MainClass { public static ...

2 years ago
« - 9 -

© 2024 OneMinuteCode. All rights reserved.