88 Topics

Member Avatar for
Member Avatar for sephzy

Hey there, Just hit a road block in my assignment. I won't concern you too much with the assignment itself but it's basically a number input operated menu with option's like "Display employee details" & "Input pay details." I'm up to a part where I need to get the section …

Member Avatar for JamesCherrill
0
326
Member Avatar for popeyemissy

I need to fix the code. Once a war event takes place, no points are assigned however in the next deal whoever wins (be it the player or computer) should get double points. One point for the war and the second point for the next deal that was won as …

Member Avatar for JamesCherrill
0
311
Member Avatar for sss93

I have a class orders which has its instanced stored in a QMap/Map and has a Key:int, value:order pattern. Everything went fine until I started iterating through the map and accessing the functions of the class.First I was trying to print out the order objects values using it's getter methods …

0
118
Member Avatar for Michael27

This tutorial is about extension methods in c# **What is an extension method** Sometimes it is necessary to add functionality to a library for which you do not own the source code and where using inheritance to subclass functionality is not viable. This problem can be overcome with the careful …

0
169
Member Avatar for Pyler

Do you need to implement a class in order for an object to access the class's functions/methods? When should you implement a class? When shouldn't you?

Member Avatar for rubberman
0
338
Member Avatar for cmmmm

Below is part of my code for a simple java game. I am trying to keep the most recent 10 scores and names of the game in the prevScore and prevScoreName arrays. Both return statements in the method come up as errors, saying it requires int[] and what is found …

Member Avatar for JamesCherrill
0
765
Member Avatar for ppstyle

Please provide some web references which I can add in my asp.net website. I am from india , I urgently need a web service, even if its a paid one, but I need a working one. Please help!

Member Avatar for ShivaSaurabh
0
158
Member Avatar for SCass2010

Hi everyone, I'm currently trying to do a bit of java programming after not looking near it for almost a year. Most of what I've been doing has been C/C++, and I was just wondering - in C++ you could have a header file with functions only in it, say …

Member Avatar for SCass2010
0
361
Member Avatar for programnoob

I am running into and problem where I am trying to pass an element in an array to a method to calculate the tax that is owed but all I get as a result is 0, which is not right. Here is the writeline: Console.WriteLine("Taxpayer # {0} SSN: {1}, Income …

0
89
Member Avatar for DavidKroukamp

Hey all, I have been busy building my own chess game and as of now im a bit stomped. Well you see i have an object Board, this object will be initiated and it will create a new frame with various panels one of them being the panel which holds …

Member Avatar for JamesCherrill
1
241
Member Avatar for TIM_M_91

Hi guys well I have two class's 1 class for my methods and another class for my GUI. In my method class I have my update statements for my database and in my GUI class I have obviously my gui and all my buttons that will produce a result when …

Member Avatar for stephen84s
0
180
Member Avatar for dsmith12

So my code is suppose to get information from the user and figure out how much funding the two professors get. My code runs twice but for some reason only the last entry is saved and outputted and my formula for calculating the new funding only outputs zero for some …

Member Avatar for stultuske
0
213
Member Avatar for jpsider

Hi all, I'm working on a school project and I am running into a problem, possibly more... This is my first post, so I am sorry if it ends up ugly. Here is a description of the project: This project focuses on demonstrating your understanding of classes and objects. Before …

Member Avatar for Philippe.Lahaie
0
9K
Member Avatar for EmbroideryEtc

I have written a class to read a text file and write the data into a 2D array of max records x 12 fields. Now that I have this working, I need to be ablel to call this array from my other classes to perform different tasks on the data. …

Member Avatar for NormR1
0
955
Member Avatar for begueradj

Hello people, I designed this class: [CODE] package aiproject; /* * This class has the task to read the data stored in a file called "fichier.txt" * line by line. * The read lines will be put inside a List called lignesDeMonfichier * Also, this class counts the number of …

Member Avatar for JamesCherrill
0
315
Member Avatar for km2011

i have problem about the output in this code, my output so only the index 0. how can i fix this. [code] public class d_2D { static double[][] d =new double[6][4]; static double[][] e= {{}, {0.0,0.6,0.0,0.0}, {0.0,0.2,0.5,0.1}, {0.0,0.2,0.5,0.4}, {0.0,0.2,0.5,0.7}, {0.0,0.0,0.0,0.9}}; static double[] avg= new double[4]; static double[] sum= new double[4]; …

Member Avatar for km2011
0
171
Member Avatar for rahul.ch

[CODE]class Mammal { String name = "furry"; String makeNoise() { return "generic noise";} } class Zebra extends Mammal { String name = "stripes"; String makeNoise() { return "bray";} } public class Zoo { public static void main (String[] args) { new Zoo().go();} void go() { Mammal m = new Zebra(); …

Member Avatar for rahul.ch
0
150
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 techlawsam

So I have a placeholder question in the code that i am reviewing [CODE] { Console.Clear(); Console.WriteLine("{0,24}", "Calories Burned"); Console.WriteLine("\n{0,15}:{1,8:f1} hours", "Hours", hours); Console.WriteLine("{0,15}:{1,8:f1} minutes", "Minutes", minutes); Console.WriteLine("{0,6}:{1,8:f1} calories burned", "Calories Burned", CaloriesBurned); Console.ReadKey(); }[/CODE] I know the first half of the following code "{0,15}" , 0 is placeholder and …

Member Avatar for Mitja Bonca
0
127
Member Avatar for niall.lennon2

[CODE]class Date { private int day, month, year; // the date Date(int d, int m, int y){ day = d; month = m; year = y; } Date(){ }; void get() { day = Console.readInt(); month = Console.readInt(); year = Console.readInt(); } void put(){ System.out.println(day + "/" + month + …

Member Avatar for Ezzaral
0
165
Member Avatar for TrustyTony

Here unsystematic play with linked list structure Object Oriented style. If you have performance critical code, please do not use this but use the superb faster than list [URL="http://pypi.python.org/pypi/blist/"]blist module[/URL] (including sorted versions of main data structures). As OO newbie (though with some 30 years of other programming), I wanted …

0
207
Member Avatar for techlawsam

Ok I think im getting better at these but not quite still have these implicit convert from int to string problems and the usual "does not exist in the current context" dilemma. [CODE]/* * */ using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Calories { class Calories { static …

Member Avatar for arunkumars
0
204
Member Avatar for herstein

Hey guys. I am trying to write a programme (not using scanner class) which prints the smallest number in an external text file called README.txt. Anyway I included some explanation of what I am doing so hopefully it's clear. What this programme prints is 0.0, which is not even a …

Member Avatar for JamesCherrill
0
122
Member Avatar for RM@Bowdoin

I implore you to ignore the poor formatting, ignore the overall functionality even; my problem lies with trying to call the Scanner scan within flow method from readBoolean and readBoolean2D methods. It says it cannot find variable scan. How can I access this variable? [CODE] import java.util.*; import java.io.*; public …

Member Avatar for ~s.o.s~
0
335
Member Avatar for 5minutes

So I am supposed to write a class that converts fahrenheit to celsius (& vice versa), calculates the volume of a sphere after a radius is entered, and calculates the hypotenuse of a right triangle, all using nothing but static methods. Here is what I have so far; [CODE]class Fun …

Member Avatar for JeffGrigg
0
168
Member Avatar for alliswim2010

Hello I'm having major issues, please help me with this code; (Generating random characters) Use the methods in RandomCharacter to print one hundred uppercase letters and then one hundred single digits, and print ten per line. Use these methods: public static char getRandomUppercaseLetter(){ return getRandomCharacter('A', 'Z'); } public static char …

Member Avatar for alliswim2010
0
689
Member Avatar for chiiqui

[CODE]public class GAME { boolean gamestatus = true; double amounts[] = {0, 0.01, 0.5, 1, 5, 10, 11, 14, 20, 300, 600, 150, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 28 }; Briefcase briefcase[] = new Briefcase[27]; public void casesSetup(){ for (int i …

Member Avatar for chiiqui
0
124
Member Avatar for king03

Hi there guys I need your help so badly as I can't finish my program. The instructions are: create a console application that instantiates a class with a method that takes in a string of values converts upper case to lower case and vice versa. The method also returns the …

Member Avatar for duke_swh
0
379
Member Avatar for anuj_sharma

Hi Guys, I was going through a [URL="http://www.daniweb.com/software-development/java/threads/374765"]thread[/URL] in this forum and there is one very good reply to this thread. In the past Ive never used such techniques to idetntify how many classes would I create in my program, thus my programs used to be complex. Can you suggest …

Member Avatar for JamesCherrill
0
166
Member Avatar for Newskin01

So I have an array [CODE]String[] directions = {"n", "e", "s", "w"}; Random dirPick = new Random(); int rNum = dirPick.nextInt(4); String direction = directions[rNum];[/CODE] Now say that one of these doesn't exist and if it picks it I need to take it out of being able to be picked. …

Member Avatar for DarkLightning7
0
124

The End.