97 Topics

Member Avatar for
Member Avatar for tweeeter

I need to modify the following program to store person objects instead of integers. Include a function to input person data from the keyboard in the person class (similar to the readRecord() function). Also add a non class function to display the list contents. Include a separate search function (search …

Member Avatar for Ancient Dragon
0
158
Member Avatar for justinfritz

I am having trouble with this part of my program assignment. I have created and compiled the three separate implementation files that design the three classes, they each have a default constructor, overloaded constructor, and a display function. //************************************************************************************************************ "When your program is working correctly, define an array of pointers …

Member Avatar for Saith
0
310
Member Avatar for jeanbarca

Hello guys i am writing a c++ code that should do the following: 1- Creating a stage group just like the champions league first round consisting of 4 teams each on has 4 attributes ( points, gf, ga, gd) 2- The user must be asked to enter each team name, …

Member Avatar for jeanbarca
0
305
Member Avatar for DEAD TERMINATOR

I'm working on a music player and I want to make it so that if I'm playing a song and I click on another song in the list the first song stops before I hit play on the second one, without having to manually stop the first. So just the …

Member Avatar for DEAD TERMINATOR
0
2K
Member Avatar for phummon

Hi everyone, I'm a moderate-level C++ programmer who is a little rusty at the moment. I've got an object question which is driving me nuts. I'm sure this is a C++ 101 level question, but for the life of me, I can't recall the solution. Basically, I've got one object …

Member Avatar for phummon
0
254
Member Avatar for kavithabhaskar

I am looking at a source code There is a class called A and it has a parameter in its _init_ function called. Class A self.id = id There is another class called B and has a parameter in its __init__ function called Class B self.ide = ide There's an …

Member Avatar for inuasha
0
115
Member Avatar for mechanicallogic

I simply cannot figure this program out (nor why I am going in debt paying professors to "teach" me). Our assignment begins with reading a data from a file and storing it in an object array and then displaying the contents of that array. When I compile the program in …

Member Avatar for Ab000dy_85
0
221
Member Avatar for Hattoff

Hey everyone, I am new to the site and to programming so please be gentle. I am working on a simple project where I use pre-created classes that define shapes and call the methods within them to create a picture on a canvas. I have most of this down, but …

Member Avatar for JamesCherrill
0
236
Member Avatar for lifeworks

Hi Ive been fiddling with trying to emulate classes in javascript - but currently getting an undefined error hen I click one of the vote buttons... Ive got two vote buttons, 'vote_positive' and 'vote_negative' and have cretaed two vote button objects... on construction they firstly assign a value to the …

Member Avatar for stultuske
0
164
Member Avatar for smash92

I'm having trouble with the calculate mean method in my Average Driver. The Average class is fine it's just declaring the objects and instantiating them I'm having a problem with. Any help would be greatly appreciated. [CODE]import java.util.Scanner; public class Average { Scanner input = new Scanner(System.in); private int[] data …

Member Avatar for JamesCherrill
0
500
Member Avatar for diafol

Hi all, been dipping my toe into OOP and am getting on OK, but I'm hitting a bit of a wall with a current project. classes: db (a PDO extended class) User Timetable The db is just a few shorthand ways of running PDO The User is just for handling …

Member Avatar for diafol
0
210
Member Avatar for pendo826

I want to place an object into an array so that when i call the array my stats, inventory objects will show up is it possible ? here is my code: [CODE] void displayStats() { const int SIZE = 11; string stats[SIZE]; status Status = {100,20}; cout << "******Stats******\n"; stats[0] …

Member Avatar for raptr_dflo
0
232
Member Avatar for ZeroEddy

Hey, I have been studying Java for a year in college and this year we started Object Oriented Programming. We have been givin some assignments and stuff but they all include creating Objects and Classes. Does anyone know of any good resources for Creating these as I am slowing down …

Member Avatar for ZeroEddy
0
237
Member Avatar for digipak

Hello, I have a class Pdisk [CODE] class Pdisk { public : Pdisk(string diskname, int numberofblocks, int blocksize); private : string diskname; int numberofblocks; int blocksize; }; [/CODE] Now I want to make a class filesys which can access an object of class Pdisk. I am not sure how to …

Member Avatar for StuXYZ
0
502
Member Avatar for Labdabeta

Is there a way to make a class visible only from within another class. i.e: [CODE]class myclass { private: class anotherclass { //stuff that only can be used from within a myclass function void dosomething(); float dosomethingelse(); }*anotherclasses; int numanotherclasses; public: int createanotherclass();//creates anotherclass object, puts it in the array …

Member Avatar for mike_2000_17
0
229
Member Avatar for ARaza110

[CODE]public class cation { public static void main(String[] args) { new cation().run(); } public void run(){ harada hara=new harada(); insert(hara); insert(hara); } public void insert(harada hara){ if(hara.left==null){ hara.left=new harada(); } else{ insert(hara.left); } } class harada{ harada left; public harada(){} } } [/CODE] Can someone please explain, recursion in objects …

Member Avatar for ARaza110
0
167
Member Avatar for bravo1382

Hello all, I am fairly new to c++ and I am completely lost right now. I am suppose to create two dynamic arrays that prompt the user to enter how big the arrays should be and it also asks the user to enter the numbers they want to store in …

0
97
Member Avatar for twistedspoon

I'm having trouble understanding the binarySearch method in the Arrays class when using an Object array. Is it possible to use this method to search for a specific field within an object in an object array? For example, if my Object array is an array of Person objects, each with …

Member Avatar for Ezzaral
0
122
Member Avatar for denvious

Hello All, I'm currently having an issue trying to retrieve elements that have been saved within my arraylist. I currently have two classes, Project and Staff. In the Project class, i have declared an ArrayList of type [i]staff[/i], as seen below: [CODE]public static ArrayList<Staff> staff = new ArrayList<Staff>();[/CODE] In the …

Member Avatar for denvious
0
9K
Member Avatar for ShadowBorn

I have this assignment due and its a bit tricky, i was wondering how is it possible to incoporate both C-string and a [I]string[/I] object at the same time. Any help would be very very appreciated. thank you all in advance. Here is the actual problem from the book. [B]Write …

Member Avatar for NathanOliver
0
142
Member Avatar for Poopster01

This is my first time writing an array of objects and I’m having an issue putting it all together. I have written two classes and the third program that is supposed to test the classes. ***PROBLEM*** My primary issue at the moment is that my program to test the classes …

Member Avatar for javaAddict
0
311
Member Avatar for karlamadeus

Hello all. I am trying to write a short little game, mainly to boost my knowledge of classes and objects, and of course I am starting to encounter problems. I have several classes for different types of creatures in this game. Most of them take the form of: [CODE] class …

Member Avatar for griswolf
0
223
Member Avatar for clickspiker23

I am supposed to read in data from a file and store it. I know how to read from a file and display it, in main, what i don't understand is how to do that with classes and objects. This is the part im having a little trouble with and …

Member Avatar for jjman4562
0
168
Member Avatar for ihatehippies

how do I catch changes to a mutable object ie: [CODE=python] class test(object): def __init__(self): self.x = [] def __getattr__(self, atr): print 'retrieving atr %s' % atr return self.__dict__[atr] def __setattr__(self, atr, val): print 'setting atr %s to value % s' % (atr, val) self.__dict__[atr] = val [/CODE] >>> instance …

Member Avatar for ihatehippies
0
224
Member Avatar for ghost_from_sa

Hi guys, Im pretty dam stuck at the moment on an assignment Im meant to do. Its my last question so everything is pretty laid out, but the question (to me is not useful) so if you could just help me out it'd be much appreciated Ok so what i …

Member Avatar for ghost_from_sa
0
969
Member Avatar for 24x24

My assignment: develop a limited application to track the statistics of sports players. For each player, track first and last name, points scored, assists made, and penalty rate. Design and implement an object capable of recording this info. Implement this object as Player. Must allow user to enter new player …

Member Avatar for yancouto
0
210
Member Avatar for MarvelWolverine

Hi, I am writing a program to solve the 8puzzle, but for some reason i am having more difficulty with the structure than the algorithm.... I have two classes, a tree and node class. My main problem is to put the nodes in an array in the tree class. Second, …

Member Avatar for Narue
0
298
Member Avatar for Queen007

The total number of objects on one of my page is 76 which by their number will dominate web page delay. how can I reduce this to a more reasonable number? The total size of my page is 1451727 bytes, which will load in 304.53 seconds on a 56Kbps modem. …

Member Avatar for teedoff
0
108
Member Avatar for trebor-pl

Hi, I am writing a program that allows to keep track of some racing records and to do this I need to be able to save objects on a external file and then load them with next startup of the program. As I am just a beginner I need your …

Member Avatar for trebor-pl
0
1K
Member Avatar for justinwarner

Hey, So I have an ArrayList that has some people in it. It's like: First Name, Last Name, and Position (At a job). So, I have it make the name complete. so like... Last name and then first name, no space... So, then, I need to sort the ArrayList by …

Member Avatar for VernonDozier
0
171

The End.