|
i need your help guyz...
i have a project in java programming...
its hard to understand...
please help me..
Q1) Define a class called Rental that has the following properties
a) Userid of string type
b) Days of rental
c) Rental per day
d) Include appropriate accessors,mutators and constructor(s) as well as a method to change the cars' information.
e) Include a method longParking which will return true if the days of car rental above 6days otherwise return false.
Q2) Define a class called Carpark that has following properties.
a) An array season_rental that can allowed up to maximum 35 car rental at a time.
b) Include a method that will allow new rental information to be included into the system.
c) include a method to search for a car rental information.
d) include a method to increase the renting rate by 12%.
e) include a method to display all rental details that are currently still being rented out.
Q3) Define a main menu program that will allow all the rental information to be manipulated.
i hope you will reply my first post as soon as possible...thx...
Godbless...
|
|
|
|
|
we don't do homeworks here.
Read the guidelines, try to do the work yourself first, and ask for specific question only when you're stuck on something.
If you cannot do anything at all, then you're not the one for the job...
|
|
|
|
|
for the programmin task,you are going to a simple application which allows 2 people 2 play tic tac toe. you will have 3 major classes as defined. each class should go in its own file.
1.Player:
*represent a player in the game
*it should have following constructor:pulic player(string name, char symbol)
*the class whould have 2 properties:name and symbol.
2.Board:
*represent the board on which tic tac toe is played.
*it should have 1 data properties,a 3*3 array which represnets the playing area.
*it should have the following constructor:public board(),which initilizes the data property to be an empty board.
*At a minimum,it should have the following methods:# public void printBoard()#public boolean isFull()#public boolean isWinner(Player player)#public boolean setpiece(int row,int col)
3.Game:
*contains the main()
*prompts the users for their name
*must use the player and board classes to manage the game.
*should report who the winner is , or if the game was a tie.
|
|
|
|
|
we don't do homeworks here.
Read the guidelines, try to do the work yourself first, and ask for specific question only when you're stuck on something.
If you cannot do anything at all, then you're not the one for the job...
|
|
|
|
|
Hello,
I am developing an application which uses mysql database. The database will be located on one of the system on the lan.
I need that i enter the ip address of the system on which database is located and it should connect to the database.
Thanks
Vinod Maurya
|
|
|
|
|
hi everybody
i am a .net developer and i start to use java with spring.
i want to load a xml file in File object at this way :
File f = new File("D:/MyProjects/Sun Java/MyClinic/src/Clinic/Core/ApplicationContext.xml");
and in netbeans debug mode when compiler wants to process this line encourge pause and next line not processed
say something usefull about relative path in java.
please forgive me for my bad english skill.
thanks all.
---------------------
Areff Bahrami(KAVEH)
Areff.HB@Gmail.com
---------------------
|
|
|
|
|
Enclose that line in a try{}catch(){} block and see if there is an error being generated.
Don't let my name fool you. That's my job.
|
|
|
|
|
I hope someone can help me out here. I am not that familiar with JS and I found this script online which I modified, but I can not control how to open the links. All the links open in the same window but I have some external links that I have to open in a new window.
Here is an example of what I have:
bar.addMenu('Insulated Glass');
bar.addItem('http://www.associatedmaterials.net/Docs/glass_specs/Units.pdf','IG Quality');
I would appreciate any help.
|
|
|
|
|
Please do a Google search for Javascript.
As far as anchor tag attributes, you want "target=_blank". The anchor tag [<a...>~</a>] is not Javascript, but HTML.
Don't let my name fool you. That's my job.
|
|
|
|
|
how can i connect items list at j2me to required form
i need the code that make it
necessaryyyyyyyyyy
|
|
|
|
|
Is this[^] helpful?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hi all
I want to start Mobile (Cell Phone) Programming with java (those *.Jar files)
But i don't know from where i should start.! Could anyone give me some start point...Article,E-book,...
Thanks in advance.
Kind Regards.
|
|
|
|
|
Hi i need peer-to-peer voice chat project on java.
can any one post that for me.
|
|
|
|
|
You need to goto www.rentacoder.com for that. Or with such a simple app, you could even just Google it.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Dear All,
I am looking for a good IDE similar to eclipse.
Any ideas ?!?!
Regards,
Muhammad Nauman
"Mess with the Best, Die like the rest"
|
|
|
|
|
What exactly is wrong with Eclipse? There are plenty other out there, but I couldn't begin to suggest without knowing what is wrong with the one you use now. I prefer Eclipse myself anyway.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
There is nothing wrong with it, but somehow the other my machine seems to be dead once eclipse has started.
I was just thinking trying out another ide
"Mess with the Best, Die like the rest"
|
|
|
|
|
You could always try the one that Sun provides if you download the right Java bundle. I believe they call it Netbeans. (http://www.netbeans.org/downloads/index.html[^])
I've played with it, but I prefer to use Eclipse myself.
Don't let my name fool you. That's my job.
|
|
|
|
|
I cannot advise better than the other answer you got. to me, Eclipse is the best IDE for Java/J2EE I know...
|
|
|
|
|
Hello! I need to make some search in the registry...
I need to find all the keys and the values that include some word, and to
delete them... I know there is a class Registry, but I don't know how to
do what I need.
Maybe someone could help me? (in Java)
if someone could show me an example code it will be great!!!
Thanks!
Raz.
|
|
|
|
|
need help in writng a class WordStore in order to compile WordTest1, WordTest2, WordTest3 and WordTest4. Need to create some sort of data structure to store words in WordStore. must have methods
public void add(String word)
Adds a String to the collection
public int count(String word)
Returns the number of times a String is in the collection
public void remove(String word)
Removes one occurrence of a String from the collection, or leaves the collection unchanged if the String does not occur in it.
code for WordTest1:
import java.util.Scanner;
class WordTest1
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
WordGen.initialise(input);
System.out.print("Enter the number of words you wish to generate: ");
int n = input.nextInt();
WordStore words = new WordStore(n);
for(int i=0; i<n;> words.add(WordGen.make());
String line = input.nextLine();
System.out.println("Enter words to test, empty line to exit");
line = input.nextLine();
while(!line.equals(""))
{
String[] wordlist = line.split(" ");
for(int i=0; i<wordlist.length;> {
int count = words.count(wordlist[i]);
System.out.print("\""+wordlist[i]+"\" ");
if(count==0)
System.out.println("NOT generated");
else if(count==1)
System.out.println("generated once");
else
System.out.println("generated "+count+" times ");
}
line = input.nextLine();
}
}
}
code for WordTest2:
import java.util.*;
class WordTest2
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
WordGen.initialise(input);
System.out.print("Enter the number of words you wish to generate initially: ");
int n = input.nextInt();
WordStore words = new WordStore(n);
for(int i=0; i<n;> words.add(WordGen.make());
System.out.print("Enter number of words you wish to test: ");
n = input.nextInt();
String[] testWords = new String[n];
for(int i=0; i<n;> testWords[i]=WordGen.make();
long time1,time2;
int count;
time1 = new Date().getTime();
for(int i=0; i<n;> count=words.count(testWords[i]);
time2 = new Date().getTime();
System.out.print("Time taken to test membership of "+n+" words ");
System.out.println("is "+(time2-time1)+"ms");
}
}
code for WordTest3:
import java.util.*;
class WordTest3
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
WordGen.initialise(input);
System.out.print("Enter the number of words you wish to generate initially: ");
int n = input.nextInt();
WordStore words = new WordStore(n);
for(int i=0; i<n;> words.add(WordGen.make());
System.out.print("Enter number of words you wish to add: ");
n = input.nextInt();
String[] testWords = new String[n];
for(int i=0; i<n;> testWords[i]=WordGen.make();
long time1,time2;
int count;
time1 = new Date().getTime();
for(int i=0; i<n;> words.add(testWords[i]);
time2 = new Date().getTime();
System.out.print("Time taken to add "+n+" more words ");
System.out.println("is "+(time2-time1)+"ms");
}
}
code for WordTest4:
import java.util.*;
class WordTest3
{
public static void main(String[] args)
{
Scanner input = new Scanner(System.in);
WordGen.initialise(input);
System.out.print("Enter the number of words you wish to generate initially: ");
int n = input.nextInt();
WordStore words = new WordStore(n);
for(int i=0; i<n;> words.add(WordGen.make());
System.out.print("Enter number of words you wish to add: ");
n = input.nextInt();
String[] testWords = new String[n];
for(int i=0; i<n;> testWords[i]=WordGen.make();
long time1,time2;
int count;
time1 = new Date().getTime();
for(int i=0; i<n;> words.add(testWords[i]);
time2 = new Date().getTime();
System.out.print("Time taken to add "+n+" more words ");
System.out.println("is "+(time2-time1)+"ms");
}
}
|
|
|
|
|
hi
my problem is that im trying to build a one armed bandit using Java but i carnt figure out the If statement that lets you get:-
3 shapes of the same type win £1
2 shapes of the same type win 50p
one particular shape, say a apple win 20p
my coding that i have already should be below
any help with this problem would be great
thanks
Adam
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.Timer;
public class ConcentricCirclesWithTimer extends JFrame implements ActionListener
{
private JPanel panelDraw;
private JButton btnDraw, btnBye;
private Random random;
private Timer timer;
int width = 10;
int height = 10;
int x= 100;
int y = 100;
int timerCounter = 0;
public static void main(String[] args)
{
ConcentricCirclesWithTimer drawConcentCirc = new
ConcentricCirclesWithTimer();
}
public ConcentricCirclesWithTimer()
{
setLayout(new FlowLayout());
random = new Random();
panelDraw = new JPanel();
panelDraw.setPreferredSize(new Dimension(200, 200));
panelDraw.setBackground(Color.GRAY);
btnBye = new JButton("Bye!!");
btnDraw = new JButton("Draw.. .");
add(panelDraw); add(btnDraw); add(btnBye);
btnDraw.addActionListener(this);
btnBye.addActionListener(this);
setTitle("Using Pannel to Draw . . . .");
setSize(300, 300);
setVisible(true);
}
public void actionPerformed(ActionEvent event){
if (event.getSource()== btnDraw) {
timer = new Timer(400, this);
timer.start();
}// end of if
if (event.getSource() == timer ){
drawConcentricCircles() ;
}
if (event.getSource()== btnBye) {
System.exit(0);
}
}// end of actionPerformed
private void drawConcentricCircles(){
// x, y, height and width need to be declared globally?? Why??
// declare them here and run program!!
timerCounter = timerCounter + 1;
Graphics drawOnPanel = panelDraw.getGraphics();
drawOnPanel.setColor(new Color(random.nextInt(255),
random.nextInt(255), random.nextInt(255)));
drawOnPanel.drawOval(x, y, width, height);
width = width+20;
height = height+20;
x = x - 10;
y = y-10;
if (timerCounter>11){
timer.stop();
JOptionPane.showMessageDialog(null,"Timer stopped!!");
}
}
}
|
|
|
|
|
I assume this is a standard 3-wheel slot machine?
You should have a "slot" object defined somewhere, or at least some member variables to hold the "shape" and "color" values of each slot wheel.
The "if" statements aren't writable until we know what to compare them with.
For example, would it be "if (slot1Color == 0)" or "if (slot1.color == Color.RED)" or something else?
All you have written is a skeleton application. None of that concerns the question you wanted help with.
Don't let my name fool you. That's my job.
|
|
|
|
|
hi,
I had developed a chat application it is running well on a single system.I want this chat appl. to be communicated with other system like normal chatting. Plz help me out vth this issue.
thank u.
|
|
|
|
|
How You developed the Code?Is it developed by JAVA Threading?
Please let me know the code so that i can give you the exact way to do it.
thanks
Apurba
|
|
|
|