1,089 Topics

Member Avatar for
Member Avatar for BboyRodimus

I'm writing two classes for the main program code. I'm stuck trying to do figure out how to instantiate an object of the class Address: [B]Address class:[/B] [CODE]public class Address { private String city; private String state; public Address() { city = "?"; state = "?"; } public Address(String aCity, …

Member Avatar for sneaker
0
1K
Member Avatar for tristan17

Hi, I have been practising some OOP and have encountered this error `" cannot resolve symbol - variable MyInput"` I wonder wat's wrong...here is part of my code: public class BorrowMortgage { //Main method public static void main (String[] args) { //Create one borrower Borrower borrower = new Borrower( ); …

Member Avatar for naushadahmed
0
192
Member Avatar for gibson.nathan

im making a grades program to try to keep my skills sharp. since i have gotten out of apcs i havent really been doing too much of anything with java. i decided the other day that i was going to try to make a grade program, kind of like what …

Member Avatar for coil
0
676
Member Avatar for oscarp

Hi, I have a map of a base class object (not pointer to objects). I did this because I need to have inheritance from others types like this: Parameter RealParameter: Parameter IntParameter: Parameter ... My problem is that when I am going to insert in the map, copy constructur of …

Member Avatar for mike_2000_17
0
2K
Member Avatar for johnbryle

hello every One.. ..can any0ne help me create a 'picture puzzle' using GUI.. OOP'. ..ur answerz r highLy apPrecited.. thankz have a nice day ahead'

Member Avatar for johnbryle
0
161
Member Avatar for Xufyan

Is it possible to call a constructor if we entered know value in the output screen ??? example !! [CODE]import java.io.*; class Employee{ int num; static int count=0; float compensation; public void print(){ System.out.println ("Employee number: " + num + ", Employee Compensation: $" + compensation); } public Employee(){ num …

Member Avatar for group256
0
194
Member Avatar for ftl25

Hi folks, I am writing an application in C, but I have the OOP functionality that C++ provides. (i.e., I can only use C library functions). I have a function as follows in TSL1.cpp: [CODE] void TSL1_ExecuteTest (char *sCmdInt[]) /******************************************************************************* Name: TSL1_ExecuteTest Description: This function executes tests from current TSL1 …

Member Avatar for ftl25
0
186
Member Avatar for aliskov

Hello everyone, I'm a high school student highly interested in computer science in general. I've already taken two Computer Science AP classes, both in Java. I took the Computer Science AP exam last year and got a 5 on it, so I'm OK when it comes to Java. Not too …

Member Avatar for ddanbe
0
299
Member Avatar for Your_mum

Hello DaniWeb, I'm relatively new to DaniWeb, and recently decided to come back to an attempt at learning to C++. I just finished reading a particular section on OOP etc. and i have some questions about pointers to objects: like: [CODE] MyClass *Object; [/CODE] Can someone please: 1) Explain why …

Member Avatar for Your_mum
0
217
Member Avatar for Xufyan

I got to assignment first one was to print the data of two students using different classes and constructors and count the total numbers of records and i've done this. here is the program. [CODE]public class Student { int RollNo; String name; static int stdcount=0; public void print(){ System.out.println ("Roll …

Member Avatar for NormR1
0
837
Member Avatar for Viasur

Hello all. First I have to let you know that Im a total newbie trying to understand Python using the book 'A byte of Python'. I'm following everything on that book and is been kind of fun until OOP (object orient programing). Im getting an error in most of the …

Member Avatar for Viasur
0
1K
Member Avatar for toomuchtodo

Hello all, I have a question on the proper (OOP) way of gathering user inputs from multiple textboxes on my main Form and then using these calculations in various functions inside a class or two. I currently have a 1-D array of values that I have to name, and then …

0
54
Member Avatar for cintojose

Hello Everybody... I am very new to VB.NET coding..My manager assigned me to write a Single Program that uses OOP concepts like Abstraction,Encapsulation,Inheritence and Polymorphism.As there is a time limit plese help me in this.............Thank You all..........CintoJose.

Member Avatar for kvprajapati
0
112
Member Avatar for majestic0110

I just wanted to demonstrate a quick point regarding Constructors & inheritance. Look at these two classes and think about what you might expect to see after the main method has run. Notice that ClassB is a subclass (inherits from) of ClassA. So, what do we expect the output to …

Member Avatar for masijade
3
667
Member Avatar for java..

how OOPS concept playing roles in terms of compile time and run time polymorphism. how inheritance and encapsulation and polymorphism applied in real time application. when and where and how to decide this oop concept fit for this like java bean,interface,abstract,etc?

Member Avatar for java_programmer
0
199
Member Avatar for pathikhobo

hello people, i'm new here in Daniweb and very much interested in web development(Specially php,mysql,ajax based web applications). I know HTML and CSS, but don't have any past experience in any scripting/ programming language like javascript or c(though i know basics of C), java etc. Some of my friends suggested …

Member Avatar for richman_tck
0
264
Member Avatar for jackabascal

It may seem like a simple answer, but how do I pass an image to a bitmaps constructor. for example: [CODE]Bitmap bmp = new Bitmap(########);[/CODE] what would I put in place of the pound signs If i wanted the default image to be C://Users/Me/Documents/Visual Studio 2010/Projects/MyProject/Image.jpg Please help.

Member Avatar for Geekitygeek
0
187
Member Avatar for BryanMColeman

I am rewriting in Visual Studio 2008 c++ an application written in VB.NET that successfully connects to an oracle 10g database using OracleDataAccessClient.dll. I am trying to utilize the same dll in the c++ app though very unsuccessfully. In the project's Property Pages, I have successfully referenced the dll. In …

0
39
Member Avatar for Havsvindar

Hi! I have found this nice place while searching about C# on the net. I am starting to get a new profession at age 44 and will begin a 2 year education as system developer.net in August. I have worked with marketing, advertising and graphic design before and really enjoy …

Member Avatar for maceman
0
68
Member Avatar for Ubraxis

I require some help with a program I've got to write, the theory behind it is based around OOP, but I'm having trouble grasping what exactly I should be doing. I'm not entirely sure how to call the addProperty method from the Property class, or even that I've written out …

Member Avatar for Ubraxis
0
102
Member Avatar for crodriguez08

Hey there, I need some help with the placement of constructors and how the second constructor would work (there's two of them). All I ask is for some explanation. These are the exact instructions: The default Constructor should build a dynamic array of size 3 for the grades. Another constructor …

Member Avatar for crodriguez08
0
475
Member Avatar for Garrett2011

take following class and two object definitions: [CODE=c++] class Rect{ public: enum centimeter; enum meter; Rect(double len,double wid,enum centimeter){ length=(len/100); width=(wid/100); } Rect(int len,int wid,enum meter){ length=len; width=wid; } //rest of implementation private: double length;//in meters double width;//in meters }; Rect obj1(10,5,Rect::centimeter()); Rect obj2(10,5,Rect::meter());[/CODE] two previous constructors have dummy enum …

Member Avatar for Garrett2011
0
2K
Member Avatar for jagan605

I have recently learned in school about the dreaded diamond.And I wrote a program using virtual inheritance to overcome the problems.I use g++ and I have the following errors with this program, [CODE]//doing to create an illustration for dreaded diamond #include<iostream> using namespace std; class vehicle { public: virtual void …

Member Avatar for Fbody
0
561
Member Avatar for Garrett2011

take two following classes and their constructors as samples: [CODE=c++] class One{ public: One(int a,int b):adad1(a),adad2(b){} private: int adad1; int adad2; }; class Two{ public: Two(int input[]){ for (int i=0;i<10;i++) araye[i]=input[i]; } private: int araye[10]; };[/CODE] considering objects with static storage duration, I think first constructor can be applied during …

Member Avatar for Garrett2011
0
403
Member Avatar for Garrett2011

Suppose we have following two classes: [CODE=c++] class Temp{ public: char a; char b; }; class Final{ private: int a; char b; char c; public: Final(Temp in):b(in.a),c(in.b){} //rest of implementation };[/CODE] can we initialize an object of the Final class with following syntax in upcoming c++0x standard: [CODE=c++] Final obj(Temp{'a','b'});[/CODE]

Member Avatar for mike_2000_17
0
257
Member Avatar for adaniel058

I have tried to create a simple class where the program passes a name and telephone number to my class type and then prints it to the screen. It tells me I have undeclared identifiers, but I am constructing my program just like an example we did in class. Can …

Member Avatar for adaniel058
0
115
Member Avatar for aragmus

hi guys what constructors should i use for this program? [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace BACKUPEXEFILES { public class cCOPY { private string _directorypath; private string _filename; public string directorypath { get { return _directorypath; } set { _directorypath = value; } } public string filename …

Member Avatar for k.d.m
0
130
Member Avatar for steaky1212

Hi, A bit of a tricky question, so I will try to explain everything in its fullest. I am trying to replicate some of the Terrarium work done by the Microsoft guys, but I dont want to look at any of their code. Anyway I have my base class which …

Member Avatar for nick.crane
0
207
Member Avatar for Tekito

I'm about to write a new program in Visual Basic. I have Visual Studio 6.0, but it's limitations are starting to become a problem and I'm wondering about trying Visual Studio 2008 Express (unfortunately purchasing the full version is not an option). I would hate to get halfway through and …

Member Avatar for pweegar
0
221
Member Avatar for TotoTitus

Hello everyone. This post will contain an amount of personal feelings within it. I'm not a very experienced/skilled programmer, and my main 'background', if i can call it so is in windows forms applications (Visual C++, C#), where conceptually speaking, everything is driven by events, the only possible difficulties arriving …

Member Avatar for TotoTitus
0
195
Member Avatar for ssuss

hi every body..... ^_^ i have these problem in linked list and i need some one to answer it please..... Develop menu driven C++ program to manage the College of Science Book Store. Your program should maintain three linked lists: one for books, another one for students and a third …

Member Avatar for steventaal
-3
179
Member Avatar for Ghazanfar Ali

Hey I am new to this forum and to OOP please help me in developing window and to change the background color when i execute my program..... I am using Dev C++ of bloodshed[code][/code]

Member Avatar for Fbody
-1
65
Member Avatar for Iron_Cross
Member Avatar for enkidu75

I am new here and this is my first post so I'm sorry if anything in this post is done incorrectly. I have taken a C++ class but did not get into any object oriented parts of it (all linear). Now I am in an object oriented class which is …

Member Avatar for Ancient Dragon
0
342
Member Avatar for BrianDickson

Hi all, I'm after the opinion from experienced website devs. I want to build a website provides articles, of which some are restricted to subscribers. I will want to give users the ability to comment and rate articles. So I will need the following functionality: [LIST=1] [*]authentication [*]forms [*]user profile …

Member Avatar for BrianDickson
0
146
Member Avatar for mloC

I was wondering how one would go about creating a structure that cannot be used by itself, i.e. only through a wrapper class. My question is what would be the syntax for this construct? I'm currently on a personal project to make simple tests from old tests, all the questions …

Member Avatar for mloC
0
114
Member Avatar for darelet

Hi all, I've been trying to work on solving this myself but failed short of new ideas. I am experiencing memory heap errors ever since I tried to transfer some functions (for calculating statistics i.e. getMode/getMean/getVariance) into a new class in the spirit of OOP. Compiler error is... --> This …

Member Avatar for mitrmkar
0
383
Member Avatar for sashaa

i have been given an oop project on quiz condution while using operator overloading and file handling ..plzz help:(

Member Avatar for daviddoria
0
39
Member Avatar for ttboy04

Hello, I don't have technical problem. I was just thinking the difference between arrays and SQL. I am currently learning OOP in java and C# but my employment history is based on SQL Server. So I was thinking about this subject in my head and I don't see why bother …

Member Avatar for samaru
0
140
Member Avatar for cdgregory

Hi, I would like some advice on how to create a class to represent a one to many relationship in C#. i.e. I have a Customer and an Address table in my database. I also have a Customer class in my C# solution but how do I introduce the multiple …

Member Avatar for cdgregory
0
70
Member Avatar for Lolalola

Hi, On this site I found a lot of cool examples of PHP OOP. Maybe you know where to find complete examples? Guest books, registration forms, blog... When I look at the full model is much easier to understand OOP PHP. As different classes interacting with each other, exchange data …

Member Avatar for rajarajan2017
0
102
Member Avatar for pi_lord12

Ok, so I'm trying to make a constructor for a text-based game for a monster. Here is the code for it: [CODE]public class Methods { String name; //characteristics of monsters int bodyPoints, mindPoints, attack, defense; public Monster(String name, int bodyPoints, int mindPoints, int attack, int defense) { this.name=name; this.bodyPoints=bodyPoints; this.mindPoints=mindPoints; …

Member Avatar for pi_lord12
0
2K
Member Avatar for daudiam

[CODE]class A extends B { C ob1=new C(); D ob2=new D(); protected void finalize() { System.out.println("Finalizing A"); super.finalize(); } public static void main(String ss[]) { new A(); System.gc(); } }[/CODE] Though System,gc() doesn't guarantee the running of finalization, my question is if the JVM is able to run the finalizations …

Member Avatar for daudiam
0
299
Member Avatar for abhi74k

Why is the constructor called from top to bottom rather than bottom to top ????

Member Avatar for abhi74k
0
149
Member Avatar for zreed

I need to code a program for my friend and it has been giving me some difficulties. This needs to have two classes, one called Tester and another called Game. And the data in the Game class needs to be pulled to the tester class after the calculations are finished. …

Member Avatar for CrazyDieter
0
199
Member Avatar for dohpaz42

In a nutshell I am trying to write a program that will connect to a database, query several tables for various sets of data that will then be transformed into XML that is stored into a file on the local hard disk. My first thought process to solve this problem …

Member Avatar for dohpaz42
0
207
Member Avatar for vs.vaidyanathan

When i run this, i get an error message saying TYpe expected and it points to the line having a.drive(100)... Any help please? Newbie... [code] class Car { public Car(){ int odometer=0; System.out.println("Car constructed!"); } public void drive(int miles) { System.out.println("Driving....."); odometer+=miles; } public long odometer; } class Guzzler extends …

Member Avatar for NormR1
0
261
Member Avatar for catalyst491

Hello, I'm not too experienced with C++ (I know C# pretty well), and I can't figure this out. I've got two files, Form1.h and Utility.h. Form1.h is initialized when the program starts, and when the user clicks a button, it should call some functions in Utility.h. Now the problem I …

Member Avatar for daviddoria
0
207
Member Avatar for abrou

Hello, I have come across a compile error, which should have a very simple solution, but I cannot figure it out. I am fairly new to programming and am still getting used to OOP. I am trying to call a function from another class. The class seems to work but …

Member Avatar for deepavj
0
4K
Member Avatar for Buolbear4444

So, I'm writing a roguelike game in C++. But, its complaining about a class I made called "Player" in the file "player.h" in the file "monster". When I input into monster this function: [CODE] void attackplayer(Player& hero, bool checkup, bool checkdown, bool checkleft, bool checkright) { if (checkup == true …

Member Avatar for Buolbear4444
0
186

The End.