462 Topics

Member Avatar for
Member Avatar for incubus9x9

Please dont tell me to "google" it obviously I'v tried everything and this is my last resort. k thanks :) ok so I have to set a value to be restricted in the constructor ___________ Modify the constructor and set methods of the Shape class to verify the values of …

Member Avatar for seanbp
0
204
Member Avatar for digan

Hi, i have this assignment to do and i dont really know what i have to do could someone tell me what i have to do in simpler language thanks Here is the assignment: Create a program which: Implements a class called Queue: The class should contain an array of …

Member Avatar for digan
0
95
Member Avatar for hwalsh

Hi, I've been working on this for two days. I need to pass an arraylist to another class. It gets the information, and will print out the menu, until the program goes back to the initial class, then the list empties. I don't get it, and I'm so confused. [CODE]public …

Member Avatar for hwalsh
0
7K
Member Avatar for Slyvr

I'm working on a really basic text editor to save and open txt files. On my text area setLineWrap, it's giving me a "misplaced constructs" and "delete token" for the period and (true) For why? [CODE]/**Matthew Schrum *11/18/2010 */ import java.awt.*; import javax.swing.*; import javax.swing.border.*; import java.awt.event.*; import java.io.File; import …

Member Avatar for Slyvr
0
278
Member Avatar for tshudyb

I have created a JFrame contaning a JTabbedPane. What I am trying to accomplish is the changing of tabs within my 'addCustomer()' class via an ActionListener. What I was trying was to call the method 'setTab(int c)' located in my 'BoatLog()' class, from my 'addCustomer()' class to set the index …

Member Avatar for tshudyb
0
1K
Member Avatar for Dean_Grobler

Hi there, This is just going to be a quick question. Also just note that I am i some "remote location" so I cant even show you my code. But what I want to know is this: Say you have a package called "myPackage" and inside that you have 2 …

Member Avatar for JamesCherrill
0
141
Member Avatar for Obsidian_496

Hello. I have a problem with one part of my homework. I'm not exactly sure how to say this in English. I want the constructor to build an object and assign string values to attribute1 and attribute2. I'm only posting the relevant part of my code. My class can be …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for sharkpit

this is the summary of program and i only include the addition of matrices my problem would be the variables in Addition class cannot read variables from the other class i need to know how to fix that the error would be : The name 'a' does not exist in …

Member Avatar for Mitja Bonca
0
123
Member Avatar for amandureja

Hey guys! This is my very first post on this website. Anyways, I just started learning Python, and am reading an ebook, called "A Byte Of Python". So at the end, it says to create an address book application. In my application, it basically just creates a text file with …

Member Avatar for richieking
0
2K
Member Avatar for anglwthnati2de

Hi guys. I am hoping for a little help with this. I am pretty new to programming and just can't seem to get things right yet. Here is my code. It returns like 40 errors. Way messed up eh? [CODE]#include <iostream> #include <string> using namespace std; class Date { public: …

Member Avatar for anglwthnati2de
0
193
Member Avatar for TrustyTony

This code is giving minimal change from real Python class to JavaMonster with every method having setter and getter not following the PEP8 naming but capitalizedWordsFormat. When instrunctor turns his head or if you put the code in your library, you can simply remove the setter/getter lines.

0
259
Member Avatar for henryford

Hey guys I have a study guide that I need some assistance with if possible. it is basically definitions. Classes={} Assume these statements are working with classes and objects: Attribute?property Instance Encapsulation Also I need to tell what this code does. I am not good with classes at all please …

Member Avatar for SgtMe
0
116
Member Avatar for Tsunami49

Hi there. I am currently trying to get my head around using classes across two files. I currently have a super class and a sub class stored in a file and the main function in another. When I try and pass arguments to the class they work fine if the …

Member Avatar for Tsunami49
0
135
Member Avatar for geethasree

Hi All, this is my first query after joining the forum. I would like to know following points: 1. If I can create threads in constructor 2. If yes, can I use the same object / instance (which created this thread)in this thread to call other methods of the class …

Member Avatar for geethasree
0
2K
Member Avatar for ace8957

Hi all, So I'm working on this program to use a circular doubly linked list to implement a queue class. It went fairly well, but I'm stuck on the copy constructor, which causes runtime errors whenever I try to test it. Nonetheless, I really don't see what I am doing …

Member Avatar for caut_baia
0
2K
Member Avatar for ace8957

Hello all, So I'm working on this simple program with a Queue class template that is publicly derived from the abstract base class CharQueue. The only problem is that I keep getting hit with the error "expected class name before '{' token". The reason I don't understand this is that …

Member Avatar for Fbody
0
728
Member Avatar for Rez11

The point of the program I am making is to have a pure abstract base class called BasicShape and have 2 child classes, Circle and Rectangle. I have the program written but with one unresolved error. [B]Main.cpp file[/B] [CODE]#include "Pure.h" #include <iostream> using namespace std; int main() { Circle pizza(2,2,10); …

Member Avatar for Rez11
0
965
Member Avatar for mommabear

[B]Specifications (minimum):[/B] The CDROM class contains the following, private, data members: string Name; // The Name of the CDROM string CDType; // The Type of CDROM float Cost; // The Cost of the CDROM [I]The ONLY recognized (i.e., legal) CDROM types are, “Game”, “Word”, “Compiler”, “Spreadsheet”, “Dbase”, and “Presentation” (AND, …

Member Avatar for mitrmkar
0
148
Member Avatar for notuserfriendly

I am reading from a file. After i tokenize and assign each value to a string field i call the constructor and initialize the object. next i want to add them to an array. I have done this with a vector and all i do is [CODE=java]ObjectVec.add(obj1);[/CODE] Mind you this …

Member Avatar for masijade
0
171
Member Avatar for rcogq7

//This is the error that i have Exception in thread "main" java.lang.NullPointerException //at CardTest.main(CardTest.java:16) /** * @(#)CardTest.java * * * @Robert Coughlin * @version 1.00 2010/10/15 */ //this is the main public class CardTest { public static void main(String [] args) { Card [] randomCard=new Card[20]; for(int i= 0; i<20; …

Member Avatar for kramerd
0
230
Member Avatar for Radio2006

I am trying to start this java program using the requirements below, but I have no idea where to start. Just so you guys know, I am just starting out in this language. i have experience in Javascript programming, but this is completely different. I am used to Java programs …

Member Avatar for Radio2006
0
243
Member Avatar for PerplexedB

[CODE]Partial Class system.windows.forms.control Overridable Sub ioEnabled(ByVal mode As ModeValues) End Class[/CODE] ... gives me a zillion errors. Is there a proper way to "expand" a system class?

0
83
Member Avatar for emilyhedgecock

Basically, its all to do with the inventory system, all the other reams of code work fine, thank God! with the inventory, the idea is that each character can hold 5 items, so an array, but the array needs to hold the itemID and the itemName therefore an array wont …

Member Avatar for Stefano Mtangoo
0
153
Member Avatar for ana_1234

This is a friend operator overload function that used addition. It adds two mix fraction by reducing them to simplest form the adding and converting them back to a mixed number [CODE]Mixed operator+(const Mixed& f1, const Mixed& f2) { int newnum, newnum2, gcd, tmpNumerator2, tmpNumerator, tmpInteger, tmpInteger2; Mixed r; tmpNumerator …

Member Avatar for ana_1234
0
430
Member Avatar for ana_1234

So I've been working on this program for a while, I'm finally finish but I have two error that I can not understand why. My first error is when I am declaring the header f [CODE] //------------------- Mixed.cpp -------------- #include <iostream> #include "mixed.h" using namespace std;[/CODE]ile> it keep sending me …

Member Avatar for ana_1234
0
296
Member Avatar for PerplexedB

VB2008 won't let me drag my lblBase class from the toolbox onto a form in design mode. Why? Is there a way around this? [CODE]Public Class lblBase Inherits System.Windows.Forms.Label 'Public Sub New() 'MyBase.new() ' Me.BackColor = Me.Parent.BackColor 'End Sub End Clas[/CODE]

Member Avatar for JJCollins
0
127
Member Avatar for Garrett2011

Is there any way to inline just some selective calls to a particular function not all of them? by function I also mean class operators like assignment operator, constructors like copy constructor. The only form I know is declaring function as such at beginning and that's supposed to effect all …

Member Avatar for Narue
0
151
Member Avatar for doctorjo5

I'm having trouble figuring out a few different methods that I'm putting into a constructor. Any chance for advice? I'm having trouble with the last 3 near the bottom. I want to compare two name variable to each other to see if they are the same regardless of case, then …

Member Avatar for NormR1
0
201
Member Avatar for Rikard

Hallo! I've been having some trouble getting a save/load function to work properly. I'm trying to save object and their properties to a file in binary using fstream. And then being able to load the object from the binary file the next time im running my project. Quick breakdown: I …

Member Avatar for Rikard
0
204
Member Avatar for liran ritkop

Hi I want to build some objects that have a little difference between them. But i wonder how would i do it - 1. build a class with some variables and build objects out of him, or - 2.build class for each object, with the functions dedicated to this 'only …

Member Avatar for mike_2000_17
0
126

The End.