class tag

88 questions


1 answers
53 views
0
A message appears that there is no default constructor.

Point class, which stores coordinates of points, andRectangle class that inherits Shape.#include <iostream>#include <vector>#include <string>using std::cout;using std::endl;class Poi...

2 years ago

1 answers
81 views
0
[Java] I ran the example in the book while I was studying, and I got an error. java.lang.NoSuchMethodError

Below is the code that was moved as it was in the book.----------------------------------------------------------------------------------------------------------class FruitSeller { int numOfApple; int...


2 answers
109 views
0
Use format function for Python class

I'm going to pre-define the function in the class and import it at any time to use it.The desired output value is m1: How is your relationship going? g1 ah?def romance(self, listener): print({}): How'...

2 years ago

1 answers
132 views
0
How many classes should I put in one file?

In Java, I only put one public class in one fileI don't know what to do with Python.Some modules have only one classThere's a lot on some modules.What is the standard for making a module in Python?

2 years ago

1 answers
112 views
0
To import and sort Python text files into a list

Hong Gil-dong Computer 72Yi Sun-shin Electronics 50a heterogeneous computer 80When the data in the file is like this, The data structure is made of classes with names, departments, and creditsYou want...


1 answers
82 views
0
I want to use the class for the values in the list (add code and error message)

a = class()b = class()c = class()..z = closs()In order to use the class, you must enter Instance = Class(). In this way, I didn't type in from a to z one by one, but I made a list and made a repeat se...

2 years ago

1 answers
77 views
0
I have a question about Python class

Hello, I'm a beginner who just started Python. I'm new to the idea of class, and I'm creating a class that's associated with square columns. I've almost finished everything else, but I don't know how ...

2 years ago

1 answers
59 views
0
Python class cat was defined, but cat was not defined.

class cat: def __init__(self, name, age): self.__name = name self.__age = age def setname(self, name): self.__name = name def getname(self): return self.__name def setage(self, age): self.__age =...

2 years ago

1 answers
114 views
0
I'm working on a class search program, so please give me some advice

class stat: def __init__(self, line): self.genre = line[1] self.member = line[2] self.album = line[3] self.like = int(line[6]) self.stat = [] self.total = 0 def like_sub(self.line): a = stat(se...

2 years ago

1 answers
93 views
0
c++ problem maximum common multiple and minimum common multiple

I need to find the maximum common factor and the minimum common multiple using the external class, but it can't be implemented.Please.#include <iostream>using namespace std;class Test {private: ...

2 years ago
« - 7 - »

© 2024 OneMinuteCode. All rights reserved.