1,089 Topics

Member Avatar for
Member Avatar for connect2abhi

Hi Can any one tell me how to call a subclass method from a superclass? For example: I have a class A,B and C. Now B and C extends A. So is there any way that we can call a method of B in A? Thanks Abhishek

Member Avatar for DavidKroukamp
0
13K
Member Avatar for tgiwa

I'm new to OOP php and I am trying to load objects into an array. I followed the syntax I found [URL="http://www.daniweb.com/web-development/php/threads/286967"]here[/URL] and it works but only for the first object :sad: Here is the code i am using for the class [ICODE] class category { // Variables var $id, …

Member Avatar for tgiwa
0
222
Member Avatar for prakhar_cool

[CODE]#include <iostream> using namespace std; class X{ public: int p; }; int main(){ int b; X obj; int X::*ptr = &X::p; obj.p = 100; cout<<obj.p<<endl; cout<<ptr<<endl; cout<<obj.*ptr<<endl; system("pause"); return 0; }[/CODE] When i run this program, i get the output as: 100 1 100. I understand why it shows 100...but …

Member Avatar for rubberman
0
271
Member Avatar for xxvicoxx

Hello guys well I have been working in this arraylist that is now driving me crazy! Bascially I wrote a CAR class which has some methods in it, however now I created an arraylist so it could store cars from the other class and at the same time have access …

Member Avatar for jeff-fisher
0
1K
Member Avatar for biogig

guys I've been trying to write this lab for my comp sci class for three days now. i've got to the point where it compiles but when I try to run it a table pops up that's says there's an error somewhere in the program that causes it to abort. …

Member Avatar for daviddoria
0
204
Member Avatar for Labdabeta

I have a function that takes a reference to an interface class as a parameter. I have created a derived class from the interface class, but when I try to call the function with an instance of my derived class as an argument I get a compiler error saying "error: …

Member Avatar for Labdabeta
0
147
Member Avatar for Haytham Karem

Guys ,, i want help regarding the career path of the SAP ,, I'm certified SQL Server development and administration and some skills like (c#, OOP concepts) , now ... one of my friends give me advice to learn sap ,, i've choices one of them is go for ABAP …

Member Avatar for Haytham Karem
0
114
Member Avatar for Karlwakim

Hi everybody, I am learning c++, i tried to learn java but it seams hard. do you personally think that learning c++ will make me understand OOP in a bad way ? Is it better to learn c++ before java or vice versa ? Is java slower than c++ (Some …

Member Avatar for Karlwakim
0
438
Member Avatar for FEC

Hi am trying to write a program and its giving me this error "cannot instantiate abstract class", can someone help me please? this is the code: Header: [CODE]#ifndef ABSTRACTGEOMETRICOBJECT_H #define ABSTRACTGEOMETRICOBJECT_H #include <string> using namespace std; class GeometricObject { public: GeometricObject(); GeometricObject(string color, bool filled); public: string getColor(); void setColor(string …

Member Avatar for Kanoisa
-1
381
Member Avatar for Reeseoo

Hi all new to this forum, just thought i'd post in here because i am having a bit of trouble with an assignment... basically i have this class in a header file called Product.h... [CODE] class Product { private: int _id; unsigned int _price; public: }; [/CODE] I access this …

Member Avatar for Reeseoo
0
535
Member Avatar for Kunal0

Hi, I have a basic understanding of C++ and was creating something myself with a class of 6 integers and a string what I want to do is to be able to find the mode values for each of the six integers and strings I have instantiated a set of …

Member Avatar for ravenous
0
288
Member Avatar for Labdabeta

I have been teaching myself algorithms and I am stuck with the AlphaBeta AI algorithm. I want to test my knowledge of it with a TicTacToe simulation. The thing is I want it to be easy to modify for any two player game and I cannot figure out how to …

Member Avatar for Labdabeta
0
170
Member Avatar for yousafc#

Please tell me deeply about classes and objects My Question are: What is class? Why we use class? How can we use class? what do help class? Please tell me and also tell how can I learn about class?

Member Avatar for thines01
0
210
Member Avatar for sieuwe

Hi, I've got a problem with my project. When I initialize an arraylist, the content is displayed and you can go through the arraylist by correctly answering the given word. But when I load a new arraylist from a file, the old arraylist is removed and the new one is …

Member Avatar for JamesCherrill
0
226
Member Avatar for g3nX

Hello, I am having trouble forwarding ports. I am using Asus RT-N56U router. Tried to forward many random ports but when I check canyouseeme.org it says "Connection refused". My windows firewall is off. Don't have any other. I also tried forwarding ports on my older router DGL-4100, but no luck. …

Member Avatar for g3nX
0
333
Member Avatar for epicbeast9022

Hello everybody I [I]thought[/I] I understood inheritance but it turns out I don't. I am creating an SDL/OpenGL mini-GUI library. I have a master class, GUIComponent, with subclasses such as TextLabel under it. I have a vector called guiList that is initialized as [ICODE]std::vector<GUIUnit*> guiList[/ICODE] (it's extern'd and initialized elsewhere; …

Member Avatar for vijayan121
0
175
Member Avatar for Dman01

Hi community First I want to thank everyone who will look through this, because it's a longer post. I'm currently reading a book on AI by Mat Buckland. I'm re-building Mats entitymanager, though I just copied it. He used std::map to collect all entities as pointers which are cross referenced …

Member Avatar for Dman01
0
3K
Member Avatar for thatscrap12543

Hi, networking is new to me in vb.net as I normally use third party components to do my networking like Winsock Orcas. However I want to make my own classes for networking. The following is what I have so far. It has problems. 1) Its disorganized...particularly the way I'm multi-threading, …

0
170
Member Avatar for roona

Hay every one Hay everyone I need help I have project in subject programming languages about make one idea on two languages c and java . I have made it in java and c++ but I couldn't in c This is the code in C++ [CODE]// Link.cpp : Defines the …

Member Avatar for VernonDozier
0
242
Member Avatar for roona

Hay everyone I need help I have project in subject programming languages about make one idea on two languages c and java . I have made it in java but I couldn't in c this is the code in java [CODE] Class Link // Link.java // to run this program: …

Member Avatar for zeroliken
0
218
Member Avatar for Chuckleluck

Hello, I'm working on a game, and for this game, I created a class. There is one object of this class for each player in the game: [CODE]class PlayerClass { public: PlayerClass(Nationality); // Constructor ~PlayerClass(); // Destructor sf::Sprite PlayerFeet; sf::Sprite Arms; sf::Sprite Body; sf::Sprite Head; int HitPoints; GameClass CurrentClass; }; …

Member Avatar for Chuckleluck
0
189
Member Avatar for Goshutu

Hi, i am doing a multiple-file project and i come across a difficult obstacles. I want your help, DaniWeb readers on this problem, which i find very strange: [CODE] #include "stdafx.h"//i have included vector header here #include "globals.h" #include "functions.h" using namespace std; #ifndef CPIECE #define CPIECE class CPiece { …

Member Avatar for Goshutu
0
347
Member Avatar for chinee

trying to connect a product class to the main class but i am getting errors i don't understand.like C:\Users\Juanelle\Documents\OOP Final Project\Order Process.java:36: cannot find symbol symbol constructor Product(java.lang.String,double) location: class Product Product product1 = new Product("Roses", 50.00); and in the error message the arrow is pointing at the n in …

Member Avatar for zeroliken
0
344
Member Avatar for Triarius

Hi! I'm making a console game with cars. I am stuck trying to make the enemy car approach. If you have any thoughts or ideas, let me know! I'm thinking of using classes, but i dont know how to make them :) Is this legal? It probably isn't but here …

Member Avatar for Labdabeta
0
227
Member Avatar for emitremmit

I am having problems with my program to add and multiply two 4 bit binary numbers. The part in which I am currently having trouble is when I run the program the output for the addition function is not correct. Instead of displaying the correct answer it is just displaying …

Member Avatar for emitremmit
0
277
Member Avatar for chinee

this project is an order processing prograam for a flower shop Orders are checked to see how the payment is to be made. Orders may be prepaid or, if the customer has a good credit line, they must be invoiced. Credit must be refused if the customer has paid late …

Member Avatar for NormR1
0
341
Member Avatar for haanjae

i have the server and client system. my problem is how the server enable to retrieve the client's bandwidth usage. i have the codes for bandwidth, but i am not sure how to do it because i confuse what extra codes should add in my client public partial class and …

Member Avatar for haanjae
0
333
Member Avatar for inamul20

Hi!! my application have 2 frames including tabel 1,tabel 2 when run time i insert values though textfileds to tabel 1 ,after inserting 5 or more then i click next button then display other frame with tabel 2 and tabel 2 must auto filled. my problm is last row(i already …

Member Avatar for JamesCherrill
0
237
Member Avatar for divsok

Suppose the xMethod() is invoked in the following constructor in a class, xMethod() is _________ in the class. public MyClass() { xMethod(); } A. a static method B. an instance method C. a static method or an instance method what is the answer a or b or c

Member Avatar for stultuske
0
1K
Member Avatar for JwhateverJ

I'm writing an application launcher program. The launcher will launch applications based on the files found in the working directory. (Example: a folder containing files with the extensions .docx, .xlsx, .sln, and .txt, would give the user the option to launch Word, Excel, Visual Studio and Notepad loading any of …

Member Avatar for cox44
0
927
Member Avatar for metronomu

A question regarding inheritance implementation. Let's say we have 2 classes: [CODE]class B { public: int x; // for the sake of argument it's public, don't stone me }; class D: public B { public: int x; // again x, i know ... stupid dilemma };[/CODE] Now, if you will …

Member Avatar for metronomu
0
138
Member Avatar for crc0002

My code is posted below along with it's output of errors. [CODE] #include <iostream> #include <fstream> #include <string> using namespace std; class Node { public: string name; Node* north; Node* south; Node* east; Node* west; }; class MazeConstructor { private: Node nodes[12]; public: Node* ConstructMaze(); }; Node* MazeConstructor::ConstructMaze() { nodes[0] …

Member Avatar for Schol-R-LEA
0
9K
Member Avatar for cmps

Hello, it's me with oop again, So now I understand what are oop and how to use it, but I have 2 questions: [1] - How to use controllers models views libs [2] - Is there any tutorial on how to create a cms using oop even if I should …

Member Avatar for simplypixie
0
85
Member Avatar for Yamadron

Hello This year I am taking OOP as a core course and I am starting with C#.. So my first code to accomplish is to make an array of information about different types of cars.. In a brief.. It consists of 2 forms, The first form is where the user …

Member Avatar for Fruit Alchemist
0
101
Member Avatar for BenjaminH

Hello, I wrote a hangman game but it won't output what the user entered. At the beginning the display array is filled with underscores and as the user enters letters it is supposed to get updated with their input, but it isn't updating. Can someone please tell me what I'm …

Member Avatar for Lerner
0
148
Member Avatar for nikitadurgude

[CODE]#include <iostream> using namespace std; class bike { public: bike () { cout << "Bike: no parameters\n"; } bike (int a) { cout << "Bike: int parameter\n"; } void color(int a,int b) { cout<<"Inside Bike Color"<<endl; } }; class ducati : public bike { public: ducati (int a) { cout …

Member Avatar for Narue
0
213
Member Avatar for SSight3

I've tried searching for articles that relate to this issue, but all I keep finding are articles about people who don't know how to define constructors/can't call the parent constructor/etc and I think this will cut straight to the chase. The problem code is as follows: [CODE] #include <stdio.h> class …

Member Avatar for SSight3
0
301
Member Avatar for techlawsam

Ok So Im writing a app which would pick the 'cheapest' plan for a consumer. While writing this I came across something puzzling to me. Why is it starting after the default constructor, the first CellPlan has three arguments passed too it and then the next one two and then …

Member Avatar for techlawsam
0
189
Member Avatar for narekm

HI. I want to dig deep into PHP and OOP so I have been told that Zend is a very popular framework so I want to learn . Can you give me some (not many) resources for learning the beginning Zend and step by step go deep into it ?

Member Avatar for pritaeas
0
63
Member Avatar for azdonald

Good day, I'm trying to build an online quiz for my website. i want to do it oop style but i'm having problems in certain areas but i'll need help. this is the class code [CODE]class Quiz{ // method to get the questions and answers public function getQuestion(){ $host="localhost"; // …

Member Avatar for mschroeder
0
127
Member Avatar for powerdink

Hello all, I'm trying to inherit a "CarPanel" I created using arrays to draw various shapes in order to make a car. Now I am trying to essentially create a subclass that inherits that class, but add a Timer Action to move the car across the screen. I got it …

Member Avatar for JamesCherrill
0
509
Member Avatar for javaNooblet

Hi all, I have a main GUI class as seen here: [CODE] import java.awt.*; import javax.swing.*; import javax.swing.border.*; /* * Class is to communicate with various other classes in the program to * create a roster for user based on their selection on GUI. */ public class MainGUI extends JFrame …

Member Avatar for stevanity
0
263
Member Avatar for alarifth

Hi everyone! When i compile my small piece of code it gives me the error [COLOR="Red"]C2512 : No appropriate default constructor available[/COLOR] this is my definition of class person: [CODE] // Person.h // A class defining a person #pragma once #include <iostream> #include <string> #include <functional> using std::cout; using std::endl; …

Member Avatar for mzimmers
0
10K
Member Avatar for varun.sharma

I made a code(test1.cpp) from an existing code of a game (ramble_shuffle.cpp) using classes...but the code gets stuck somewhere...Iam unable to find the fault...can some1 find please...the code hangs up.... Original game code : shuffle_game.cpp my code : test1.cpp

Member Avatar for mrnutty
0
48
Member Avatar for Amr87

Hello Everyone , I`m trying to build MVC pattern using OOP PHP , please read the rest of the post to understand what I want exactly This is the homepage controller which extends the main controller [CODE]class Home extends Controller { function __construct () { parent::__construct(); } public function index …

Member Avatar for Amr87
1
125
Member Avatar for techlawsam

Ok So I have to create a Date Class that will allow me to return the current day with data members of month , day, and year this is what I have for from my Main() class: [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace DateApp2 { class DateApp …

Member Avatar for Kohai
0
336
Member Avatar for arson09

I'm really confused at the moment. I'm not looking for anyone to give me the answers, but if you could at least give hints on what i need to do in each method, i'll be happy!! FYI, one of the main things that's confusing me is that i'm not allowed …

Member Avatar for arson09
0
225
Member Avatar for Jade4127

Hello - I am a student who bis mid-semester in an OOP course, with zero programming experience. I am trying to understand the concepts but this stuff is tough....I have an increased level of respect for all of the developers out there! Here is my question..in the code i am …

Member Avatar for Jade4127
0
496
Member Avatar for Creatinas

Hello, i need some help with code, i need to be able to print something that function returns then i press button on panel1 it should return text to panel2 textctrl in wxpython. Here is some bit of code.(i just cut code that i think is needed for this) [CODE] …

Member Avatar for Creatinas
0
155
Member Avatar for M09

Hello I can't understand OOP in python I am looking to good tutorial , i am looking to good tutorial , about OOP in python from zero Thank you

Member Avatar for M09
0
551

The End.