正规365体育投注

Questions tagged [class]

正规365体育投注 A template for creating new objects that describes the common state(s) and behavior(s). NOT TO BE CONFUSED WITH CSS CLASSES. Use [css] instead.

Filter by
Sorted by
Tagged with
0
votes
0answers
7 views

How to use setw(x) in a toString method in c++ and put it in a variable or suggestions?

I have a Book class, and I want to implement a toString method in c++, using setw(x), to format in a properly mode. I want to print something like that: > cout<<setw(10)<<book.title&...
-3
votes
0answers
22 views

how could we change code on this program until the result will be equal with it's row 10 (result = row 10)? [closed]

from datetime import datetime as dt class Car: def __init__(self, name, year, price): self.name = name self.production_year = year self.original_price = price def ...
0
votes
1answer
20 views

How to make a 2nd class that, will call a specific method from between two main classes [Java Logic]

I wanted to do here is that. When class A runs, it runs class C and class C will run class A without affecting class B (I don't know if there's any way to do it in if-statement or in Java) and, ...
0
votes
3answers
58 views

How to pass template arguments via constructor?

I'm looking for a way to pass the template arguments of a template-based class (the main class of the FastLED library on Arduino, to be specific) via the constructor of my own class (which should ...
-3
votes
2answers
29 views

How to access a classes attribute variable in other method

I am learning python3 and I want to know that how I can class testit: def assigna(): a = "Hi" def geta(self): print(self.a) test = testit print(test.geta()) How can I ...
0
votes
0answers
20 views

C++ class from text file

I have three classes called "Bus", "Car" and "Truck". All of those inherit from a class called "Auto". I managed to create "Bus" objects, "Car" objects and "Truck" objects and I put them in a text ...
0
votes
0answers
6 views

Clarification saught on Classes and Objects

I was reading this post about classes as I have a similar problem. A class has been set up, see below, and students may be added for example: student1 = Student("Harry", 16, "Mathematics"). I think I ...
-1
votes
0answers
9 views

NameError while executing a function that contains a pre-defined class

I have a following piece of code. Please refer below for details, please navigate to http://archive.ics.uci.edu/ml/datasets/El+Nino and download the El Nino Dataset import pandas as pd import numpy ...
0
votes
1answer
15 views

Arduino Object constructor in Calss sets rubbish values

I am currently trying to create a class that has a member object with a non-default constructor for an Arduino project. The object is a pointer so that I can construct when MyClass is constructed (...
0
votes
1answer
14 views

Run-Time Check Failure #2 - Stack around the variable 'e' was corrupted. occurred

#include<iostream> #include <list> using namespace std; class Euler { private: int korifes = 0; int akmes = 0; int* pinakas[]; public: void print() { cout <&...
0
votes
0answers
18 views

How can I acces description of JFXTextField?

I need to see the description of the JFoenix component JFXTextField. This should usually be possible with CTRL + clicking on "JFXTextField" somewhere in the code. In this video it works, see 3:20 ...
-4
votes
1answer
31 views

Why cannot I create generic arraylist member of generic class?

I want to add methods to return the list or particular element and I want it to work with any generic class. Why isnt Java allowing this? class ArrayListBuilder<E>{ private ArrayList<E&...
1
vote
0answers
40 views

how to remove animating nodes when they are collide each other

I am trying to create an animation effect where many bubbles infinitely move from a random position to random positions. I am creating each bubble by initiating the Bubble {} class. After the ...
-5
votes
1answer
37 views

Trying to logically understand why my object oriented program isn't working in Python [closed]

Okay, here's the issue. I'm trying to design a simple object-oriented program to take a sub sandwich order. The code is below. Note, I have made a Sandwich class that has an init, repr, eq, price, ...
0
votes
0answers
31 views

String to int array in class constructor and call from main (C++)

I'm barely beggining my C++ lessons, and I've been asked to create a class which will receive long integers, turn them into an array, adding two of these arrays, then turn the result back to a string ...

15 30 50 per page
1
2 3 4 5
4364