Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Ali Khan

Greenhorn
+ Follow
since Sep 27, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ali Khan

Seeking a J2EE/J2SE Developer with 3+ years experience. (must have experience with both J2EE and J2SE. Location is New York City. Financial industry experience is preferred, however not required. Rate will be DOE(Determined on Experience) Please send resumes to :

Nabil Rasool
Technical Recruiter
www.netXert.com
(734)222-8000 Ext 213
(734)222-8005
14 years ago
Do you need the Sun Certified Java Programmer Certifcation before you apply to take the Sun Certified Java Developer test?
I am a newbie but to Java and this site, but I know a recruiter, and he told me to paste this onto this site for him.


A Financial Services client of ours has a need for a Java/J2EE Developer in New York, New York. This is a 9 month contract with chance of becoming permanent thereafter. The ideal candidate must have 4+ years of experience. Financial Industry experience a major plus. Good verbal and written communication. Ability to work in a team environment. BS or Masters in related computer field preferred.

Please email your resumes to:

Mr. Rasool
Technical Recruiter
rnabil@netxert.com
(734)222-8000 Ext 213
NetXert Inc.
14 years ago
hmmm, how would i be able to set that equal? The main objective I have is the output being asterisks forming a square and the size of the square would be determined by the inputs I put in before.
14 years ago
DOH!
****
* *
****

It is supposed to be a square I dsont know why it is not forming a square even in this message. =( But, as I said it is supposed to form a square imprinting with asterisks.
14 years ago
The output I am seeking is for the asterisks to form a square with asterisks. LIke

****
* *
****

But, the output I am recieving is

****
---
| | ( This is supposed to be a squarelol I just didnt know how to
--- type a square onto this message lol)

I am trying to come up with an outcome of entering the dimensions of the square and it will output that square highlighted by asterisks, once again as so

****
* *
****
14 years ago
My question deals with an example taht I am trying to attempt from a book. I would liek to have some help or guidance in solving this problem.

Write an applet that reads in the size of the side of a square and displays a hollow square of that sizw out of asterisks, by using the drawString method inside your applets paint method. Use an input dialog to read the size from the user. Your program should work for squares of all lengths of side between 1 and 20.

Here is how I attemped this problem thus far.

import java.awt.Graphics;
import javax.swing.*;

public class Ch4_23 extends JApplet
{
int number1;
int number2;
int number3;
int number4;
int number5;

double modulus;
double sum;
public void init()
{
String firstNumber;
String secondNumber;
String thirdNumber;
String fourthNumber;
firstNumber = JOptionPane.showInputDialog(" Enter the first floating pont number");
secondNumber = JOptionPane.showInputDialog(" Enter the second floating point number");
thirdNumber = JOptionPane.showInputDialog(" Enter the first floating pont number");
fourthNumber = JOptionPane.showInputDialog(" Enter the second floating point number");
number1 = Integer.parseInt( firstNumber );
number2 = Integer.parseInt( secondNumber );
number3 = Integer.parseInt( thirdNumber );
number4 = Integer.parseInt( fourthNumber );
sum = number1 % number2;




}
public void paint( Graphics g)
{
super.paint( g );
g.drawRect( number1, number2, number3, number4);
number3 = number2 + 10;
number4 = number2 + 20;
number5 = number2 + 30;
g.drawString("***", number1, number2 );
g.drawString("* *", number1, number3 );
g.drawString("***", number1, number4 );






}
}



This isn't really getting the square highlighted with asterisks. It is however off when I attempt this. Can someone please guide me to figuring this one out?
14 years ago
No I don't believe I would have foudn it any easier in c++. The only experience I had of c++ was thru a classroom. I definately would not consider it as good experience. How long have you studied java?
14 years ago
Thanks! I got it this time How long have you studied Java? Ive graduated from my university but they only gave mostly c++ in their courses Now Im studying Java on my own, may I ask how long it took the 2 of you to learn Core Java?
14 years ago
On 2nd thought, after careful review this does not solve it either, am I getting close? yeesh, I thought i had it
14 years ago
Thanksss!
I believe I have it!


import javax.swing.JOptionPane;

public class Ch4_15 {


public static void main(String args[])
{
String number;
double sales1;
double sales2;
int counter;
double largest;
String number1;
String number2;
sales1 =0;
sales2 = 0;
largest = 0;
counter = 0;

number1 = JOptionPane.showInputDialog("Please enter the sales amount of item sold by Employee");
sales1 = Double.parseDouble(number1);

if(sales1 > sales2)
{
largest = sales1;
}

else
{
largest = sales2;
}
while( counter!= 10)
{
counter = counter + 1;
number2 = JOptionPane.showInputDialog("Please enter a single digit for the sales unit");
sales2 = Double.parseDouble(number2);

}



JOptionPane.showMessageDialog(null," The largest number input was " + largest, "Paycheck", JOptionPane.INFORMATION_MESSAGE );


}

}
14 years ago
Also, this problem is not to use arrays, as arrays are covered in a later chapter.
14 years ago
Hello All,
I am a newbie trying to learn thru doing exercises and reading from one study book.I have run into some troubles with one program that has me mentally stalled. Here is the problem I am working on.


The process of finding the largest value (i.e., the maximum of a group
of values) is used
frequently in computer applications.For example, a program that
determines the winner of
a sales contest would input the number of units sold by each
salesperson. The salesperson
who sell the most units wins the contest. Write a pseudocode program
and then a Java
application that inputs a series of 10 single-digit number as
characters and determines
and prints the largest of the number. Hint: Your program should use the
following three
variables:
a) counter: A counter to count to 10 (i.e., to keep track of how many
numbers
have been input and to determine when all 10 numbers been processed);
b) number: The current digit input to the program;
c) largest: The largest number found so far.



Here is what I have so far.

import javax.swing.JOptionPane;

public class Ch4_15 {


public static void main(String args[])
{
String number;
double sales;
int counter;
double largest;
largest = 0;
counter = 0;

number = JOptionPane.showInputDialog("Please enter the sales amount of item sold by Employee");
sales = Double.parseDouble(number);


while( counter!= 10)
{
counter = counter + 1;
number = JOptionPane.showInputDialog("Please enter a single digit for the sales unit");
sales = Double.parseDouble(number);

}



JOptionPane.showMessageDialog(null," The largest number input was " + largest, "Paycheck", JOptionPane.INFORMATION_MESSAGE );


}

}

Now as you can see I don't have anything to calculate what the largest number is. THis is what my problem is. I can not think of a way to do this, because if I am reading this problem correct, it states to find the largest input from 10. The only way I can think of is if name those inputs number1, number2, number3,.....number10 and use if statements to find the largest, but I don't beleive this problem is asking for it to be calculated in that manner. Can someone please point me in the right direction?
14 years ago
HI,
I was wondering what the OR operation is in Java. I know that the AND operation is && and just need to know the Or. I used to know it from c++ but have forgotten =(
14 years ago
Sorry, this may sound like ridiculous question, but what does it meant hat you reached 1K? You passed the SCJD exam? I may sound clueless but I am a newbie =)
14 years ago