32,199 Topics

Member Avatar for
Member Avatar for Peppermaud

Here is the Homework question... This is another project involving static methods and arrays. Once again, static methods are covered in the text in Chapter 5. Methods with arrays as parameters are covered in Chapter 6 sections 4 and 5. (This applies to editions 6 and 7.) 1. Write a …

Member Avatar for stultuske
0
146
Member Avatar for amit.hak50

Given a sorted (increasing order) array, write an algorithm to create a binary tree with minimal height. In this I am not getting is that how we can store binary tree as an array.

Member Avatar for BestJewSinceJC
0
116
Member Avatar for lightninghockey

I was instructed in class to do the following.... The Programming Example: Calculator in Chapter 12 is designed to do operations on integers. Write a similar program that can be used to do operations on decimal numbers. (Note: If division by zero occurs with values of the int data type, …

Member Avatar for javaAddict
0
5K
Member Avatar for denni2727

Well, my problem is that i have to print some text in a dot matrix printer with a 8.5in width x 6.5in height page. At first, I change the paper size of the printer in the server properties from windows and it fixed the problem but now i need to …

0
144
Member Avatar for ontherocks

Below is my code. I am not sure why am I getting the error "[COLOR="Red"]javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "lcc" is not defined.......[/COLOR]" [CODE]import java.io.BufferedReader; import java.io.InputStreamReader; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import javax.script.ScriptException; public class Eval { public static void main (String[] args) throws Exception { ScriptEngineManager manager = new ScriptEngineManager(); ScriptEngine …

Member Avatar for ontherocks
0
110
Member Avatar for gedas

hey guys, i have a simple code that simply asks the user to input a number a number and than where you press you mouse it draws a circle you can draw as many circles as you have specified in the beginning of the app. well there is also a …

Member Avatar for skwatamkar
0
100
Member Avatar for skwatamkar

hello friend this is the code of my splash screen i want to play a background music when this screen is appears who can i do that i have "hbd.au" file.which i want to play at back ground.I also want to stop the music when it end i.e recursive playback …

Member Avatar for skwatamkar
0
136
Member Avatar for mandeep.garg19

If a class does not extend any class and implements one interface, how many types this class has?

Member Avatar for jwenting
0
40
Member Avatar for mayann

H All, I am trying to create a login application using servlets and using sessions for storing the login info. the login info is stored in a hashmap. as the server restarts, the info is lost. So i m trying to write this info in Temp file. So that the …

Member Avatar for jwenting
0
143
Member Avatar for pinansonoyon

Hello, everybody! Please, look at this picture! You see IE and HttpWatch Basic plugin loading yahoo.com. You see a range of any http responses. But the most important is the list of loaded images. Some of them are loaded during JavaScript scripts executing, some of them are loaded during AJAX …

Member Avatar for jwenting
0
71
Member Avatar for Olliepop

Hey daniweb! I have a really serious issue in my program right now. I'll explain how this piece works: -The server sends a ping -The client replies with a pong and starts a timer -Server sends pong back and the client checks how long it took to receive the second …

Member Avatar for Olliepop
0
154
Member Avatar for collinsislee

i missed lecture today and this is what they did in class. im not sure how to complete this. hope you all can help me out. [code] class Clock { // Declare fields of the class // 0 <= hours < 24, 0 <= minutes < 60, 0 <= seconds …

Member Avatar for BestJewSinceJC
0
253
Member Avatar for beiko

im a beginner in Java and I need the user to input a year month and day and then put it in the form of yyyy-mm-dd using the Date class but I keep getting the "week day, month, date, time, year" this is part of the code [CODE]Scanner input = …

Member Avatar for PatrickSharp
0
110
Member Avatar for jpavao

Hi, If I have a class, defined in UML, that can contain itself (0 or more times) and if that class is a JPanel how would I implement it without the "Illegal Argument" runtime error? please see the attach file for a uml class diagram. Can anyone help me? Thanks.

Member Avatar for jpavao
0
166
Member Avatar for Tlaloc

I have made an array of class cards which is a 4*14 grid (The 14th space is for the 4 grey non-cards). So far i have made 2 methods for this. The first was an algorithm for figuring out where each card belongs which I painted on when they were …

0
73
Member Avatar for Emmett_1981

I have created a simple JTable with 5 columns, I need to perform validation on the column entries. I have used the getValueAt ( col, row) function to get the values from the columns. For the first four columns this works without fail but for some reason the last column …

Member Avatar for Emmett_1981
0
631
Member Avatar for smokin745

Hello guys, i m working on a program that stores details of a book collection. Following are the things that should be there: [CODE]• Write a new class ‘book’ to represent details of special book objects. A book consists of (for example) the title, number of copies, author, (“The Davinci …

Member Avatar for BestJewSinceJC
0
163
Member Avatar for tabs

In the following snippet .. i hav connected an excel sheet through jdbc jdbc excel driver. i am having two columns in excel sheet naming X and Y. the values of columns r stored in resultSet rs. then i m printing those columns values. in the method " public ArrayList …

Member Avatar for BestJewSinceJC
0
91
Member Avatar for tinamenon

public class OurList <E> implements OurListInterface <E> { // I. Local classes: // PURPOSE: To hold one data element in the linked list. class Node <E> { // I. Private member vars: E item; Node next; Node prev; // II. Constructor(s): Node (E newItem) { item = newItem; next = …

Member Avatar for Ezzaral
0
150
Member Avatar for TheWhite

[CODE]new File("config.ini");[/CODE] 1. When used via eclipse, the correct file is found in the root of the project. 2. When used via a runnable jar, it looks in C:\users\ME\config.ini How do I make it look at the file outside of the jar? New Folder: - program.jar - config.ini

Member Avatar for Ezzaral
0
170
Member Avatar for houlahan

ok so my original code was: [CODE] Patient patient = new Patient(); patient.setId(1); patient.setName("luke"); patient.setAddress("100 test"); patient.setTelNumber("01484710204"); patient.healthproblem.setBrainProblemName("Brain Cancer"); patient.healthproblem.setDateDiagnosed("30-03-1990"); patient.healthproblem.setPatientHealth("Poor"); Patient patient1 = new Patient(); patient1.setId(2); patient1.setName("john"); patient1.setAddress("100 test"); patient1.setTelNumber("01484710204"); patient1.healthproblem.setLungProblemName("Lung Cancer"); patient1.healthproblem.setDateDiagnosed("12-02-1991"); patient1.healthproblem.setPatientHealth("Poor"); patient1.healthproblem.setLungProblemSide("Left"); if ("luke".equalsIgnoreCase(patient.getName())) { out.writeObject(patient); } else if ("john".equalsIgnoreCase(patient.getName())) { out.writeObject(patient1); }[/CODE] so when the …

Member Avatar for houlahan
0
94
Member Avatar for Egypt Pharaoh

Is swich can take string parameter yes or no like [CODE] string s="Mo"; swich(s) { case "sa ": break ; case "jv": break; default : break: } [/CODE]

Member Avatar for gangsta1903
-1
129
Member Avatar for aladar04

The program should tell user how many vowels occured on each word in a given string. The string was "Once upon a midnight dreary, while I pondered weak and weary." The output generated by the codes below was: [COLOR="Green"]Enter string(s): Once upon a midnight dreary, while I pondered weak and …

Member Avatar for gangsta1903
0
110
Member Avatar for Alex_

Hello, i want to understand these methods as a programmer. The only difference i know is that "get" sends the parameters via the url while "post" does not. But what actually happens in the source code? How can i implement it? I found some source code concerning the post method …

Member Avatar for jwenting
0
196
Member Avatar for manikandan_dani

hi, I am developing web application. In this case, I wish to find the client side operating system using java(without javascript) . How to find. Please tell me... Thanks.

Member Avatar for jwenting
0
123
Member Avatar for bkafroboy69

need some help. just wanted to know if my code is right can some one read over these instuctions and tell me if my code is right like the directions public boolean add(double value) If the size of the array is less than its capacity, then the value is added …

Member Avatar for stevelg
0
167
Member Avatar for solomon_13000

The code below will throw a RuntimeException which will be caught by the first catch block that handles the RuntimeException. Then why is it that the second catch block is attempting to handle the RuntimeException. Is it because a RuntimeException and an ArithmeticException are both unchecked exception?. [CODE] public class …

Member Avatar for masijade
0
115
Member Avatar for shredded

how do i write a java code preferably using the 'while-do', 'if-else', 'for' statements to get these outcomes? n is the input and the system prints triangles of height n? n=2 . * *** n=5 ........* ......*** ....***** ..******* ********* ignore the dots, they are to align them properly thanks …

Member Avatar for javaAddict
0
775
Member Avatar for xellos

whats the best way to make gui programs write all code your self or use the gui creator from netbeans? dont you get crappy code from the creator ?

Member Avatar for jwenting
0
133
Member Avatar for Stefankarlsson

Hello everyone, im writing this post because im in need of some help or guidelines. My programs function is to be able to store cars, with this i mean being able to: add, delete and view the list of cars added. Everything is supposed to be stored in a txt …

Member Avatar for javaAddict
0
257

The End.