Darragh Bourke

Greenhorn
+ Follow
since Apr 12, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Darragh Bourke

Yeah unfortunately we have to do it ourselves, is it really really complex and hard and gonna take lots of time?
15 years ago
Hi there im new to programming and i am currently finishing up my first year software project called space wars, i have finished everything (ships, gravity etc) except we now have to create an installer like you would have for a normal game. There are no lecture notes on it and searching the internet has not helped me so far. I was just wondering if anybody could start me off or point me in the right direction or give a link to some relevant notes?

Thank You
15 years ago
It Worked, thank you very much Campbell Ritchie and Guido Sautter i'd be lost without you two!!!
16 years ago
Hi just wondering if anyone could help me with this little problem:

import javax.swing.JOptionPane;

class Exam{
String name;
String location;
int day;
int month;
int year;

public Exam(String n, String loc, int d, int m, int y){
name = n;
location = loc;
day = d;
month = m;
year = y;
}
public String toString(){
return name+": "+location+" "+day+"/"+month+"/"+year;
}
public boolean compareTo(Exam other){
if (year < other.year) {return true;}
if (year > other.year) {return false;}

if (month < other.month) {return true;}
if (month > other.month) {return false;}

if (day < other.day) {return true;}
if (day >= other.day) {return false;}
}
}
public class examA
{
public static void main(String[] args)
{

Exam[] examArray = new Exam[5];
for(int i = 0; i < examArray.length; i++){
String name = JOptionPane.showInputDialog(null,"enter name");
String loc = JOptionPane.showInputDialog(null,"enter location");
int day = Integer.parseInt(JOptionPane.showInputDialog(null,"enter day"));
int month = Integer.parseInt(JOptionPane.showInputDialog(null,"enter month"));
int year = Integer.parseInt(JOptionPane.showInputDialog(null,"enter month"));
examArray[i] = new Exam(name,loc, day, month,year);
}
int lowest_loc = 0;
for(int m = 1; m < examArray.length; m++){
for(int i = 1; i < examArray.length; i++){
if(examArray[i] != null){
if (examArray[i].compareTo(examArray[lowest_loc])) {
lowest_loc = i;
}
}
}
JOptionPane.showMessageDialog(null,examArray[lowest_loc]);

}

System.exit(0);
}
}

examA.java:29: missing return statement
}
^
1 error

Doing this for revision as I have an exam tomorrow!!!
16 years ago
It compiled!!! Thank you Vishal Pandya.
17 years ago
I am just a beginner with programming and it's my first time using two classes and it just won't compile can someone help please?

import javax.swing.JOptionPane;

class person{
String name;
int age;
public void person(String n, int a){

name = n;
age = a ;
}
public String getDetails(){
return name +" ("+age+")";
}
}
public class sortperson
{
public static void main(String[] args)
{
String m = JOptionPane.showInputDialog(null, "Enter a Name: ");
String s = JOptionPane.showInputDialog(null, "Enter an Age: ");
int g = Integer.parseInt(s);
person p = new person(m,g);
JOptionPane.showMessageDialog(null, "Your Person is" +p);
System.exit(0);
}
}
sortperson.java:22: cannot find symbol
symbol : constructor person(java.lang.String,int)
location: class person
person p = new person(m,g);
^
1 error
17 years ago