It is my understanding that pretty much everything in JS is an object and that constructors are one way to make a new object. I know that data types like Array,
I have a problem with the constructor of the WorkingStudent class: class Person: def __init__ (self, firstName, lastName): self.firstName = firstNam
I have a piece of code- public class Sudoku { static int[][] game; public static void main(String[] args) { int [][] games= n
I'm trying to infer a type from the returned type of a subclass method. So far I haven't been able to make this work without making Parent a generic class (whic
I've got a multiple student objects I want to write into with a CSV file containing their details. I've set each row of the CSV file to an array then was going
Is it a good coding practice to have the class name as variable. E.g def create_class(class_name): class class_name: def __init__(self
I am having difficulties understanding what to do here. Please bear with me I'm new to JavaScript and this section is giving me a hard time understanding how I
I'm new to pygame, and OOP in python ( used a lot of java before) For a personal project, i'm trying to make a chess game, but I have a probl
//assume there is a java class call Node, and node is an array of Node for(Node i: node){ Node j = i; } Node j; for(Node i: node){ j = i; } Can some
I've got helper which I'm including inside Create service class. This Create service inherits from Base class and I'm including ::Imports::HashFieldsBuilder to
I am confused by how a function can change a variable passed through it. For example, if I created a variable t = 1, and pass a function by adding 2 to it, insi
Recently OOP has moved from C++ to Python. I know the basics of the language more or less, but I had to work with OOP for the first time. The task is as follows
*** UPDATED object structure *** I'd like to update recursively the property values of mainObject from the properties that exist in updatingObject. let mainObje
I am from typescript background and new to dart, in typescript we are able to define interface and attach those types to the required variable which have the co
I have recently started some OOP in C++, and I was trying to make a small program in Dev-C++ to store arrays of information on employees through a friends funct
I want to design specific class hierarchy consisting of three classes: Certificate, Organization, User. Both Certificate and Organization seem to me to be kinda
I'm trying to encapsulate the Allegro5 C++ library and I want to have a namespace of rendering functions. The problem is that in order to use the rendering func
I want to declare a variable name via template literals How it is possible ? let z = 3; let test`${z}` = "hello"; //or = new obj() for example console.log
I am trying to take Dan Shiffman's prime spiral program and make it object oriented. I am putting all variables into the constructor and making the functions in
I'm pulling table data from api in my application that I wrote with Flutter. According to the API used in the table data, different types of data are coming. I