- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 33
- Posts with Upvotes
- 33
- Upvoting Members
- 17
- Downvotes Received
- 5
- Posts with Downvotes
- 5
- Downvoting Members
- 4
Hi, I have a bit of a problem of understanding of what I need to do to write this program. Could someone please provide me basic steps of what I should do? Or an example, I"m good at relating and following examples. I believe this is my last assignment for … |
|
Hi, In C program Function has three parts, Function Declaration. Function Definition. Function Calling. In java i cannot able to declare a function .Is it possible to declare a function in Java. For example: [code] import java.io.*; import java.util.*; class Fun_example { // show();//Cannot able to Declare a Function ? … |
|
//My objective of the program is using scanner class to get the input from the user and use a dialog box(JOptionPane) for output. When I compile the file I was able to enter the input from the scanner class, but I did not see the dialog box for the output … |
|
hello. I need some help on our implementation on lines of code program. here's the algorithm we have: 1. The LOC program will start by asking for the filename of the program to be counted. 2. Browse for the filename of the program to be used. 3. The contents of … |
|
I made this program but it isn't working; any suggestions? /* * Program Name : GuessGame.java * Author : James Resue * Date : October 6, 2010 * Purpose: Write a program GuessGame.java that plays the game “guess the number” as follows: * Your program chooses the number to be … |
|
Can someone give me an example on how to reverse an inputted string? example is..when you inputted "shoes" the output would be "seohs",,then it wil determine if the inputted string is a Palindrome or not.. |
|
I was given a programming exercise which calls to: "Write a program to create a file named Exercise09_19.txt if it does not exist. Write 100 integers created randomly into the file using text I/O. Integers are separated by spaces in the file. Read the date back from the file and … |
|
I am supposed to create a file that will generate 100 random numbers and then sort them. I am stuck on the sorting. I think it would be a really simple solution but i cant seem to figure it out. I have tried the arrays utility and creating a method … |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 and this 1 2 3 4 2 3 4 5 3 4 5 6 4 5 6 7 |
|
hello friends.. i want your hep.. i m searching for a mini project in java.. so please suggest some project titles to me..waiting for your reply.. thanks take care rajesh |
|
import javax.swing.*; import java.awt.*; import java.awt.event.*; public class TheatreRevenue extends JFrame { /** * */ final double percent = .20; double adultCost; private JTextField label2; private JTextField label4; private JTextField label6; private JTextField label8; private JButton button1; private final int WINDOW_WIDTH = 400; private final int WINDOW_HEIGHT = 200; /** … |
|
Does anyone have an example or a starting point for this? I have written a program that checks for palindromes but I am lost with this. Any help would be great, thank you! [COLOR=#000000][/COLOR] [COLOR=#000000]Create a class that models a palindrome. The program should have getter and setter methods for … |
|
I'm been working through my textbook and just can't seem to understand the section on covariant return types. ie) what are covariant return types, what they are used for, etc. The definition in the book is as follows. [QUOTE]An overridden method in a derived class can return a type derived … |
|
Can anyone help me to get the estimate value of float value 1001.27124 to 1001.27? Math.round(float) function return the int value. But I want to get float value result with 2 decimal point; Thanks in advance. |
|
Hello I'm writing java code read arabic character but it don't show the text correctly it show squares Any one Can help me any help will be appreciated Thanks Yours Ahmed Ghazey |
|
HI, I need some help on using the math.pow() function to solve the following problem: a^n = p(1+ r)^n how would I translate it using math.pow() Thanks for your suggestions and any help! |
|
Hi, This application does everything but show the circles and rectangles even though visible is set to true. [CODE]package Shapes; import java.awt.*; import javax.swing.*; public class ShapesTest { public static void main (String []args){ String input = JOptionPane.showInputDialog ("Enter 1 to draw rectangles\n" + "Enter 2 to draw ovals" ); … |
|
i really need help with this program i am finding a saddle number of a 2-d array which is the min value in a particular column and maximum value in its row.......and my error with the code is arrayindexoutofboundexception eg input num=4 7 6 9 10 5 3 4 6 … |
|
hi , guys i am created one application using jsp and java but i dont know how to make jar, and what configuration nedded in manifest file i want to play that application in my mobile which is supportion java application |
|
Hi guys, I'm having some trouble with my Java homework, and I was wondering if any of you could point me in the right direction. I need to find a loop that will add all the whole numbers from 1 to 1000 and print only the total. I've been spending … |
|
The method below for bubble sort should work, it displays the unsorted array fine, but for the sorted array it only displays one of the numbers. It seems to have just skipped over the other elements in the array. Here is a sample output: [COLOR="Green"]How many random even integers would … |
|
I'm trying to make my for loop print ODD numbers and print their sum and average. Here's my code: public class Loop_For2 { public static void main (String[] args) { double sum = 0f; int ctr = 1, ctr2 = 0; for (;ctr<=10; ctr++, ctr2++) { System.out.println(ctr); sum += ctr; … |
|
Hi. I can't figure out how to remove an element from an array. will I have to move get the element to be removed and swap it out with the last element and use the pop()? |
|
i need to get the output of 1 2 4 7 11 16 22 i know im on the right track however i cant figure out a way to get the outputs in the right form like 1+2+3 etc like its doing in the output i should get. i know … |
|
I could not get this past my editor, and am not bright enough to understand why. My TA and I do not share a common language fluency and I do not understand remotely what he is saying. Can anyone tell me why this doesn't run? [CODE]import java.util.Scanner; public class sumMatrix1 … |
|
Dear all , I have the following UML Diagram and below the associated Code. Can you please help me complete the code? Thanks in advance I have written my UML diagram as follows. -x : double -y : double +MyPoint() +MyPoint(x:double,y:double) +get X() :double +getY() : double +distance: (MyPoint1:MyPoint2):double +distance(p1:MyPoint:p2:MyPoint):double … |
|
I need to verify that the number the user inputed is between 1908 and 2012. here are the actual instructions "The constructor must also verify that the value provided for "year" is at least 1908 and at most 2012 – if not, set the year to 2010 by default" I … |
|
Im wondering how do I correctly generate a random number in Java. Sometimes it gives me a negative, positive, very small range ,etc. Id like a simple formula that can give me some examples to control this better. Thank you very much. |
|
Hi Everybody I am trying to write a small game in Java. I have done few things. But now I want to add some more feature in it. I am creating Enemies in Game.java using UI.java and EnemyShip.java. Now I want [B]to determine how many enemies to create[/B] [COLOR="Red"]the number … |
|
Hi I'm trying to draw a line in java using g.drawLine g.drawLine (int, int, int, int) || x1, y1, x2, y2 im trying to draw this : g.drawLine (xCenter + 200 * Math.cos(2 * Math.PI * 3 / 7), yCenter + 200 * Math.sin(2 * Math.PI * 3 / 7), … |