Object-oriented programming is a programming paradigm using "objects": data structures consisting of data fields and methods together with their interactions.
0
votes
2answers
26 views
why am i getting a global name error
I am currently encountering the following error:
NameError: global name 'player1_unam' is not defined
If somebody could please look through the following code and give me a soultion to the problem ...
-1
votes
0answers
12 views
Passing class collection list and looping through
How to pass a class collection List to a function and need to loop through the properties of that class collection. Also need to check those property value contains specific characters(like "'","," ...
0
votes
0answers
18 views
How to pass strongly typed class List to a method and loop through its properties and search a string in it using vb.net
I need to pass a strongly typed class collection List to a function and need to loop through the properties of that class collection and need to check whether those property value string contain any ...
1
vote
2answers
27 views
Chaining method calls together
For example record like this: property3->property2->property1 is understood for me, this means that property of class, is object of another class, for example:
class a {
public ...
1
vote
1answer
20 views
OOP Composition - Dealing with classes as separate instances and circular objects
I have an object in PHP with a composition of objects like:
// Settlement (DB Fields: id, name)
id = 1, name = 'Meep', jobs = array()
-
// Job (DB Fields: id, action, settlement_id)
id = 1, action = ...
0
votes
2answers
43 views
OOP design for global constant in java
So my question is if I have a father class that is related to a son class by composition. Say the father has 1 million sons. Right now I have a global constant called hair color that is the same for ...
0
votes
1answer
43 views
Trying to create a simple Dictionary type application
I'm trying to create a simple program to collect words and their translations, and then reiterate them in a different order. Honestly, I think the second part I can do no problem, but I'm not very ...
0
votes
2answers
43 views
Method could not be resolved
In my header file:
Esame();
Esame(string);
Esame(string, Voto);
This is a c++ tester class:
//OK
Esame esame("Algoritmi e strutture dati", 30);
esame.stampaEsame();
//OK
Esame esame2("Metodi ...
1
vote
2answers
38 views
What happens to memory during Polymorphism?
I've always wondered, when you cast an object pointer to its base class, what exactly happens to the memory? I presume that the memory storing all the member functions and variables in the sub class ...
0
votes
2answers
39 views
Modifying Objects within ArrayList
I was in need of a dynamic "database" of objects and after some research, decided to use ArrayList. However, I cannot modify the arraylist with the code as follows:
public static ArrayList cprofiles;
...
0
votes
0answers
15 views
Tools and modeling language for modeling Complex System
I have java(but I think language isn't important) application with 100+ classes and I want to describe it. What should I choose UML, IDEF or else? And I also search tools for modeling. Please share ...
1
vote
2answers
46 views
Differences between methods in PHP and Ruby
I'm just beginning to learn PHP. Sorry, if it's a newbie question but I'm wondering how methods work. For example, if I wanted to remove white spaces at the beginning of a string. In Ruby, I would ...
2
votes
3answers
66 views
How to check the Object Type in c++
For example we have an Animal class ,and we created some other class such as Lion class,Tiger class,etc. I have made a list of the Animal class and I want to transverse the list and process the list ...
1
vote
2answers
31 views
Calling a function that is inside a class from other class
Lets suppose I have a PHP file file1.php. Something like this:
<?php
class sqlClass {
public function one { //do something }
?>
Then in other PHP file file2.php, I have this:
<?php
class ...
0
votes
0answers
37 views
Location of descriptions of native functions in hadoop program
I wrote hadoop program on Java with C native methods and their determination caused a problem
package org.myorg;
import java.io.*;
import java.util.*;
import org.apache.hadoop.fs.Path;
import ...