32,199 Topics
| |
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 … | |
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. | |
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, … | |
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 … | |
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 … | |
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 … | |
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 … | |
If a class does not extend any class and implements one interface, how many types this class has? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 = … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 = … | |
[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 | |
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 … | |
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] | |
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 … | |
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 … | |
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. | |
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 … | |
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 … | |
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 … | |
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 ? | |
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 … |
The End.