Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
0% Quality Score
Upvotes Received
0
Posts with Upvotes
0
Upvoting Members
0
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
~4K People Reached
Favorite Forums
Favorite Tags
Member Avatar for pateldeep454

Main.java [CODE] package scrabble; import javax.swing.JOptionPane; import javax.swing.JDialog; public class Main { public static boolean isDoubloon (String word) { int count[] = LetterHist.letterHist (word); for (int i = 0; i < count.length; i++) if (count[i] == 2 || count[i] == 0) continue; else return false; return true; } public static …

Member Avatar for svfox2000
0
319
Member Avatar for pateldeep454

What are the pros and cons of class and object methods? Which is more concise (usually)? What kind of computations can be expressed most naturally using each style)? Explain PLZ!!!

Member Avatar for quuba
0
85
Member Avatar for pateldeep454

[B]Card.java[/B] [CODE] package poker; public class Card { int suit; int rank; public Card () { suit = 0; rank = 0; } public Card (int s, int r) { suit = s; rank = r; } public int getSuit () { return suit; } public int getRank () { …

Member Avatar for javaAddict
0
201
Member Avatar for pateldeep454

[B]This is my code so far......[/B] [CODE] import java.applet.Applet; import java.awt.*; import javax.swing.JOptionPane; public class HelloWorld extends Applet { Font myFont = new Font ("Times Roman", Font.BOLD, 25); public void paint (Graphics g) { g.setFont (myFont); g.setColor (Color.BLUE); g.drawString ("My Name" , 20, 30); String first; first = JOptionPane.showInputDialog (null, …

Member Avatar for quuba
0
106
Member Avatar for pateldeep454

I want to put everything into one applet. How do I do that? Please HELP :( [CODE] import java.applet.Applet; import java.awt.*; import javax.swing.JOptionPane; public class HelloWorld extends Applet { public void paint (Graphics g) { g.drawString ("Name" , 50, 25); String first; first = JOptionPane.showInputDialog (null, "Enter first number: "); …

0
51
Member Avatar for pateldeep454

I am having error in the following code. What should I do to fix it? Also, how should I call it in main method to test the code? please HELP :( [CODE] package sortingelements; public class Main { public static void main(String[] args) { } public int indexOfMaxInRange (int[] myArray, …

Member Avatar for Danny_501
0
119
Member Avatar for pateldeep454

My main.java [CODE] public static void main(String[] args) { // TODO code application logic here Rational x = new Rational (); x.num = 2.0; x.den = 3.0; System.out.println (x); Rational.negate (x); Rational y = new Rational (1.0, 3.0); System.out.println (Rational.invert (y)); } [/CODE] My rational.java [CODE] package rational; public class …

Member Avatar for harry010
0
635
Member Avatar for pateldeep454

My code: [CODE] package big; import java.math.BigInteger; public class Main { public static void main(String[] args) { System.out.println (factorial (5)); } public static int factorial (int n) { int f = 1; for (int i = 1; i <= n; i++) { f = f * i; } return f; …

Member Avatar for pateldeep454
0
141
Member Avatar for pateldeep454

[COLOR="Red"] This is my assignment: [/COLOR] The field of calculus is largely concerned with the concepts of the derivative and the integral of functions. Derivatives and integrals are closely related because they "undo" or reverse one another. If the derivative of a function is taken, a new function is obtained …

Member Avatar for javaAddict
-1
746
Member Avatar for pateldeep454

I have this code: [CODE] public static int pow (int x, int n) { if (n==0) return 1; int t = pow (x, n/2); if (n%2 == 0) { return t*t; } else { return t*t*x; } } public static void main(String[] args) { System.out.println (pow (5, 2)); } [/CODE] …

Member Avatar for pateldeep454
0
118
Member Avatar for pateldeep454

My task is: The Captain Crunch decoder ring works by taking each letter in a string and adding 13 to it. For example, ’a’ becomes ’n’ and ’b’ becomes ’o’. The letters “wrap around” at the end, so ’z’ becomes ’m’. Write a method that takes a String and that …

Member Avatar for pateldeep454
0
898
Member Avatar for pateldeep454

Assignment: One way to calculate ex is to use the infinite series expansion ex = 1 + x + x2/2! + x3/3! + x4/4! + ... If the loop variable is named i, then the ith term is equal to xi/i!. a. Write a method called myexp that adds up …

Member Avatar for pateldeep454
0
512