|
I had an even more flipent reply, but you beat me to it! We've just launched a shinny new algo trading suite that's Java based. It's only $1000 a seat; bargain.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
|
|
A listbox is a GUI-Component. You can't "store" things in there - you just can show them.
Please ask your teacher for further information
|
|
|
|
|
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
can please give me a Java source code for answering polynomial equations and source code for for a domino game? please! I really need it badly..i would really appreciate your help very much. Thank you very much...please send me the source code in my e-mail,it's eduard_trumata@yahoo.com...thanks a lot!
|
|
|
|
|
wardoe123 wrote: can please give me a Java source code
wardoe123 wrote: please send me the source code
A simple no.
hmmm pie
|
|
|
|
|
Here is the question. Thanks loads...
Some of the characteristics of a book are title, author(s), publisher, ISN, price and year of publication. Design the class Book. Each object of the class Book can hold the following information about a book: title, up to four authors, publisher, ISBN, price, and number of copies in stock. To keep track of the number of author add another instance variable.
Include the methods to perform various operations on the objects of Book. For example, the usual operations that can be performed on the title are to show title, set the title, and check whether the title is the actual title of the book. Similarly, the typical operations that can be performed on the number of copies in stock are to show the number of copies in stock, set the number of copies in stock, update the number of copies in stock and return the number of copies in stock. Add similar operations for the publisher, ISBN, book price and authors. Add the appropriate constructors.
Design a class Member, in which each object of Member can hold the name of a person, member ID, number of books bought and amount spent. Include the methods to perform various operations of the class Member – for example, modify, set and show the person’s name. Similarly update, modify and show the number of books bought and amount spent. Add appropriate constructors.
Using the class Book and Member, write a program to simulate a bookstore. The bookstore has two types of customers: those who are members of the bookstore and those who buy books from the book store only occasionally. Each member has to pay RM10 as yearly membership fees and receives a 5% discount on each book bought.
For each member, the bookstore keeps track of the number of books bought and the total amount spent. For every eleventh book that a member buys, the bookstore takes the average of the total amount of the last 10 books bought, applies this amount as a discount, and then reset the total amount spent to 0.
Write a program that can process up to 100 book titles and 50 members. Your program should contain a menu that gives the user different choices to effectively run the program; in other words, your program should be menu driven. You can use javax.swing for this purpose.
|
|
|
|
|
No problem, I'll make this for you. You can pay me by paypal, I think $950 USD will be enough for this program.
Some people... to lazy to learn at school
|
|
|
|
|
show me that ur code worth the price... boo...
|
|
|
|
|
Allright:
boolean noobIsProgramming = true;
public void example()
{
if(noobIsProgramming)
{
destroyComputerIn10Seconds();
}
}
|
|
|
|
|
wow... good code...
congrats... take care...
|
|
|
|
|
I'm having a problem with figuring out how to thread. Here is my code.
package pingpong1;
import java.awt.Graphics;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;
import javax.swing.JPanel;
public class Board extends JPanel implements MouseMotionListener, Runnable{
private PlayerPong player = new PlayerPong();
private Ball ball = new Ball();
private boolean outOfBounds = false;
private Thread th;
public Board(){
addMouseMotionListener(this);
}
protected void paintComponent(Graphics g){
super.paintComponent(g);
player.create(g);
ball.create(g);
}
public void mouseDragged(MouseEvent e) {
player.move(e.getY());
repaint();
}
public void mouseMoved(MouseEvent e) {
player.move(e.getY());
repaint();
}
public void run() {
while (!outOfBounds){
try {
ball.move();
Thread.sleep(20);
repaint();
} catch (InterruptedException e) {
}
}
}
}
I have no idea if I'm even on the path of doing it correctly. Any help would be appreciated. I'll add my other code below.
package pingpong1;
import java.awt.Graphics;
import javax.swing.JComponent;
public class Ball extends JComponent{
private int x_pos;
private int y_pos;
private int x_speed=2;
private int y_speed=2;
protected void create(Graphics g){
g.fillOval(x_pos, y_pos, 30, 30);
}
public void move(){
x_pos+=x_speed;
}
}
package pingpong1;
import java.awt.BasicStroke;
import java.awt.Graphics;
import java.awt.Graphics2D;
import javax.swing.JComponent;
public class PlayerPong extends JComponent{
private int y_pos;
public PlayerPong(){
y_pos=50;
}
public PlayerPong(int y){
this.y_pos = y;
}
public void move(int y){
this.y_pos=y;
}
protected void create(Graphics g){
Graphics2D g2 = (Graphics2D)g;
g2.setStroke(new BasicStroke(4));
g2.drawLine(20,y_pos,20,y_pos+30);
}
}
|
|
|
|
|
|
Hi, I'm having trouble trying to comprehend this worksheet for my java data structures class and was wondering if anyone could help.
Complete the following table of execution times for various ADT operations on a List at different positions in the list. All entries should use the big-oh (i.e., O(f(n)) form of expression. Assume that n is the measure of the input size. In this case, n represents the number of elements in the list when the operation occurs.
Array-based Implentation Pointer/Reference-based Implentation
Add to front
Add to the middle
Add to the rear
Delete from the front
Delete from the middle
Delete from the rear
Retrieve from the front
Retrieve from the middle
any help I could really apperciate it.
Thanks
|
|
|
|
|
see #9 above.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
You must use an array. So create one.
You are going to need a way to create a new array from the old one.
You will need a way to copy a range (start to end) from the old array to a new array given a position in the new array.
|
|
|
|
|
Hi,
I have created a Combobox containg checkbox as its items using renderer.
But am not able to select the checkboxes.
Plz help me in this.
Prajna
|
|
|
|
|
Hey!
Let me get this: a combobox containing a checkbox What is this for? verifying the user's choise is REALLLY the one he wants??
Or did you use a list and just swaped it?
greets
Torsten
|
|
|
|
|
yup...combobox containing checkbox as its elements. now am done with this job, but not able to select the checkboxes
|
|
|
|
|
|
s... its combo and checkboxes.
|
|
|
|
|
please check my last posting, I first commited it exidently. I have added some links which might help.
|
|
|
|
|
hey thank u, will check it out first.
|
|
|
|
|
i have the code of madelbrot but i dont know how to modify the program
so the question is:
how to modify the program Mandelbrot to allow a general rectangular region of the complex plane to be viewed in the image. The user may select the rectangle by dragging the mouse.
i have to modify this program but i dont know how
so would anyone help me for this problem:
<pre>
import javax.swing.*;
import java.awt.*;
import java.awt.image.*;
public class Mandelbrot extends JApplet {
public static void main(String s[]) {
JFrame frame = new JFrame();
frame.setTitle("Mandelbrot set");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JApplet applet = new Mandelbrot();
applet.init();
frame.getContentPane().add(applet);
frame.pack();
frame.setVisible(true);
}
public void init() {
JPanel panel = new MandelbrotPanel();
getContentPane().add(panel);
}
}
class MandelbrotPanel extends JPanel{
BufferedImage bi;
public MandelbrotPanel() {
int w = 500;
int h = 500;
setPreferredSize(new Dimension(w, h));
setBackground(Color.white);
bi = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
WritableRaster raster = bi.getRaster();
int[] rgb = new int[3];
float xmin = -2;
float ymin = -2;
float xscale = 4f/w;
float yscale = 4f/h;
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
float cr = xmin + j * xscale;
float ci = ymin + i * yscale;
int count = iterCount(cr, ci);
rgb[0] = (count & 0x07) << 5;
rgb[1] = ((count >> 3) & 0x07) << 5;
rgb[2] = ((count >> 6) & 0x07) << 5;
raster.setPixel(j, i, rgb);
}
}
}
private int iterCount(float cr, float ci) {
int max = 512;
float zr = 0;
float zi = 0;
float lengthsq = 0;
int count = 0;
while ((lengthsq < 4.0) && (count < max)) {
float temp = zr * zr - zi * zi + cr;
zi = 2 * zr * zi + ci;
zr = temp;
lengthsq = zr * zr + zi * zi;
count++;
}
return max-count;
}
public void paintComponent(Graphics g) {
super.paintComponent(g);
g.drawImage(bi, 0, 0, this)
}
};&lt;/pre&gt; tags
|
|
|
|