Help!..I really need someone 2 help me with this one

i need 2 make a Crime Manager Program

  • (2 Pages)
  • +
  • 1
  • 2

15 Replies - 1208 Views - Last Post: 07 March 2008 - 04:33 AM Rate Topic: -----

#1 bensongale  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 26-February 08

Help!..I really need someone 2 help me with this one

Post icon  Posted 26 February 2008 - 06:25 AM

Hi I really need this program 2 pass my data structure subject..

Program Description:

Crime Manager
- this program keeps track of the crimes handled by a particular precinct.

Tracked Information:
Date, Place, Case, Victim(s), Suspect(s), Status

Basic Operations:
*add Crime case
*remove Crime case
*edit Crime case
*find Crime case
*brose crimes


I need this in a GUI(graphic user interface) code..
Jtextframe perhaps would do..

i really need this one guys..
i hope u could help me..
thanx.. :)

im still a student, and i dont know how code this thing in a GUI..
i dont really get the algorithm itself..
its too complex for me..
need ur help badly..

please..HEELLPP!!!!! :crazy:

Is This A Good Question/Topic? 0
  • +

Replies To: Help!..I really need someone 2 help me with this one

#2 ctcodre  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 5
  • Joined: 25-February 08

Re: Help!..I really need someone 2 help me with this one

Posted 26 February 2008 - 06:38 AM

View Postbensongale, on 26 Feb, 2008 - 06:25 AM, said:

Hi I really need this program 2 pass my data structure subject..

Program Description:

Crime Manager
- this program keeps track of the crimes handled by a particular precinct.

Tracked Information:
Date, Place, Case, Victim(s), Suspect(s), Status

Basic Operations:
*add Crime case
*remove Crime case
*edit Crime case
*find Crime case
*brose crimes


I need this in a GUI(graphic user interface) code..
Jtextframe perhaps would do..

i really need this one guys..
i hope u could help me..
thanx.. :)

im still a student, and i dont know how code this thing in a GUI..
i dont really get the algorithm itself..
its too complex for me..
need ur help badly..

please..HEELLPP!!!!! :crazy:


sure take a look here. :)
Was This Post Helpful? 0
  • +
  • -

#3 1lacca  Icon User is offline

  • code.rascal
  • member icon

Reputation: 44
  • View blog
  • Posts: 3,822
  • Joined: 11-August 05

Re: Help!..I really need someone 2 help me with this one

Posted 26 February 2008 - 06:50 AM

Dream.In.Code has a policy by which we prefer to see a good faith effort on your part before providing source code for homework assignments. Please post the code you have written in an effort to resolve the problem, and our members would be happy to provide some guidance. Be sure to include a description of any errors you are encountering as well.

Post your code like this: :code:

Thanks.

Just to have the essence summarized here, as well.
Was This Post Helpful? 0
  • +
  • -

#4 bensongale  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 26-February 08

Re: Help!..I really need someone 2 help me with this one

Posted 26 February 2008 - 07:23 AM

ok i'll get my code...on our laboratory...i hope i can copy it..
its personally not my code..its our teachers code..
he gave us an example problem..
a dictionary..
u enter a word and the program give its meaning.,
it also has the same basic operations with my problem..
*add
*remove
*edit
*find
*browse
but the thing is..its tracked information was only..the word & the meaning..
ours has date, place, case, victims, suspects, status
i dont know how 2 make one..but i edited and changed some of my teachers code, and saw some familiar codes there..
so far i have few errors, the problem is i dont know how to fix them..
since its not my code..and im not familiar with codes either..
ill post his code..and mine(edited code of his)
hope u help me guys..

thnx :)
Was This Post Helpful? 0
  • +
  • -

#5 Nykc  Icon User is offline

  • Gentleman of Leisure
  • member icon

Reputation: 726
  • View blog
  • Posts: 8,638
  • Joined: 14-September 07

Re: Help!..I really need someone 2 help me with this one

Posted 26 February 2008 - 07:31 AM

post the code and the errors you are receiving - it makes troubleshooting for us a little easier.
Was This Post Helpful? 0
  • +
  • -

#6 bensongale  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 26-February 08

Re: Help!..I really need someone 2 help me with this one

Posted 27 February 2008 - 06:16 AM

ok guys..this is the edited code i made from my teachers code..

This code runs..I was able to edit some errors and i made the program run..whew! at last i made it run..the problem is its not done yet..and it outputs the wrong thing, like..Place: July 1, 2007...Crimetype: Philippines..
its all mixed up except for the victims, the suspects and the status..and other options like..Browse..Edit..and Remove wont work too..this is just an algorithm, what our teacher wants is this program in a GUI..and i dont know how to make a GUI out of this..please help..

**********Main CODE(Crime Manager.java)*******



import java.util.*;
import java.io.*;
import java.lang.String;


public class CrimeManager
{
private static final String FILENAME = "crimemanager.dat";
private static final String WORD_SEPARATOR = "=>";
private ArrayList<Entry> entries;

public CrimeManager()
{
load();
}

private void load()
{
try
{
Scanner file = new Scanner(new FileReader(FILENAME));
entries = new ArrayList<Entry>();
String line;
String crime;
String date;
String place;
String crimetype;
String victims;
String suspects;
String status;

String[] cc;

while(file.hasNextLine())
{
line = file.nextLine();
if (line.trim().length()>0)
{
cc = line.split(WORD_SEPARATOR);
if (cc.length>=7)
{
crime = cc[0];
crimetype = cc[1];
date = cc[2];
place = cc[3];
victims = cc[4];
suspects = cc[5];
status = cc[6];
addEntry(crime,crimetype,date,place,victims,suspects,status);
}
}
}
file.close();
}
catch(Exception ex)
{
ex.printStackTrace();
}
}

private void save()
{
try
{
PrintWriter writer = new PrintWriter(FILENAME);
for(Entry e : entries)
{
writer.println(e.getCrime() + WORD_SEPARATOR + e.getDate() + e.getPlace() + e.getCrimetype() + e.getVictims() + e.getSuspects() + e.getStatus());
}
writer.close();
}
catch(Exception ex)
{
ex.printStackTrace();
}
}

public void addEntry(String crime, String date, String place, String crimetype, String victims, String suspects, String status)
{
Entry e = new Entry();
e.setCrime(crime);
e.setDate(date);
e.setPlace(place);
e.setCrimetype(crimetype);
e.setVictims(victims);
e.setSuspects(suspects);
e.setStatus(status);

entries.add(e);

save();
}

public void deleteEntry(String crime)
{
int index = -1;
for(int i = 0; i<entries.size(); i++)
{
Entry e = (Entry) entries.get(i);
if (e.getCrime().equalsIgnoreCase(crime))
{
index = i;
break;
}
}

if (index != -1)
{
entries.remove(index);
}
save();
}


public String getCrimetype(String crime)
{
for(Entry e : entries)
{
if (e.getCrime().equalsIgnoreCase(crime))
{
return e.getCrimetype();
}
}
return null;
}

public String getDate(String date)
{
for(Entry e : entries)
{
if (e.getCrime().equalsIgnoreCase(crime))
{
return e.getDate();
}
}
return null;
}

public String getPlace(String crime)
{
for(Entry e : entries)
{
if (e.getCrime().equalsIgnoreCase(crime))
{
return e.getPlace();
}
}
return null;
}

public String getVictims(String crime)
{
for(Entry e : entries)
{
if (e.getCrime().equalsIgnoreCase(crime))
{
return e.getVictims();
}
}
return null;
}

public String getSuspects(String crime)
{
for(Entry e : entries)
{
if (e.getCrime().equalsIgnoreCase(crime))
{
return e.getSuspects();
}
}
return null;
}

public String getStatus(String crime)
{
for(Entry e : entries)
{
if (e.getCrime().equalsIgnoreCase(crime))
{
return e.getStatus();
}
}
return null;
}


public void editEntry(String crime, String crimetype,String date, String place, String victims, String suspects, String status )
{
int index = -1;
for(int i = 0; i<entries.size(); i++)
{
Entry e = (Entry) entries.get(i);
if (e.getCrime().equalsIgnoreCase(crime))
{
index = i;
break;
}
}
if (index !=-1)
{
Entry e = (Entry) entries.get(index);
e.setCrimetype(crimetype);
e.setDate(date);
e.setPlace(place);
e.setVictims(victims);
e.setSuspects(suspects);
e.setStatus(status);

entries.set(index, e);
save();
}
}

public ArrayList<Entry> getList()
{
return entries;
}




public static void main(String[] args) throws Exception
{
CrimeManager english = new CrimeManager();
Scanner console = new Scanner(System.in);
String input;
String crimetype;
String crime;
String date;
String place;
String victims;
String suspects;
String status;

System.out.println(" ** ** ** ** ** ** ** ** **");

System.out.println("Welcome to UC Crime Manager");
do
{
System.out.println("Select a Choice, then Press ENTER");
System.out.println(" 1 Add Crime Case ");
System.out.println(" 2 Remove Crime Case");
System.out.println(" 3 Edit Crime Case");
System.out.println(" 4 Find Crime Case");
System.out.println(" 5 Browse Crime Case");
System.out.println();
System.out.println(" 0 Program Terminated");
System.out.print("--> ");

input = console.nextLine();
if (input.equals("0"))
{
break;
}
else if (input.equals("1"))
{
System.out.println("Enter new crime:");
crime = console.nextLine();
System.out.println("Enter new date:");
date = console.nextLine();
System.out.println("Enter new place:");
place = console.nextLine();
System.out.println("Enter new victim(s):");
victims = console.nextLine();
System.out.println("Enter new suspect(s):");
suspects = console.nextLine();
System.out.println("Enter new status:");
status = console.nextLine();
crimetype = english.getCrimetype(crime);
if (crimetype != null)
{
System.out.println("> " + crime + " is already on the Crime Manager.");
}
else
{
System.out.print("Enter crimetype:");
crimetype = console.nextLine();
english.addEntry(crime,crimetype,date,place,victims,suspects,status);
System.out.println("> " + crime + " is added to the Crime Manager.");
}

}
else if (input.equals("2"))
{
System.out.print("Enter crime to be removed:");
crime = console.nextLine();
crimetype = english.getCrimetype(crime);
if (crimetype != null)
{
english.deleteEntry(crime);
System.out.println(" " + crime + " is removed from the Crime Manager.");
}
else
{
System.out.println("> " + crime + " is not on the Crime Manager.");
}
}
else if (input.equals("3"))
{
System.out.print("Enter crime to be changed:");
crime = console.nextLine();
crimetype = english.getCrimetype(crime);
if (crimetype != null)
{
System.out.print("Enter new crimetype:");
crimetype = console.nextLine();
date = console.nextLine();
place = console.nextLine();
victims = console.nextLine();
suspects = console.nextLine();
status = console.nextLine();
english.editEntry(crime,crimetype,date,place,victims,suspects,status);
System.out.println("> " + crime + "'s crimetype is changed successfully.");
}
else
{
System.out.println("> " + crime + " is not on the Crime Manager.");
}
}
else if (input.equals("4"))
{
System.out.print("Find Crime:");
crime = console.nextLine();
crimetype = english.getCrimetype(crime);
date = english.getDate(crime);
place = english.getPlace(crime);
victims = english.getVictims(crime);
suspects = english.getSuspects(crime);
status = english.getStatus(crime);
if (crimetype != null)
System.out.println("> " + crime + " ==> " + "\n" + "Crimetype:"+ crimetype + "\n"+"Date:" + date + "\n" + "Place:"+ place +"\n"+"Victim(s):" + victims + "\n"+"Suspect(s):" + suspects + "\n"+ "Status:" + status);
else
System.out.println("> " + crime + " no such crime in the Crime Manager.");
}
else if (input.equals("5"))
{
System.out.println();
for(Entry e : english.getList())
{
System.out.println(" " + e.getCrime());
}
}
else
{
System.out.println("Invalid option.");
}
System.out.println();
}
while(!input.equalsIgnoreCase("exit"));
System.out.println("Thank you for using Crime Manager");
}
}
one more thing..this program dosnt update..i have to input the crime over and over again..it dosnt store on the crimemanager.dat..how can i make it update?

*******************************************************

*****************Extension File(Entry.java)******************


public class Entry
{
private String crime;
private String date;
private String place;
private String crimetype;
private String victims;
private String suspects;
private String status;


public void setCrime(String crime)
{
this.crime = crime;
}

public void setCrimetype(String crimetype)
{
this.crimetype = crimetype;
}

public void setDate(String date)
{
this.date = date;
}

public void setPlace(String place)
{
this.place = place;
}

public void setVictims(String victims)
{
this.victims = victims;
}

public void setSuspects(String suspects)
{
this.suspects = suspects;
}

public void setStatus(String status)
{
this.status = status;
}

public String getCrime()
{
return this.crime;
}

public String getCrimetype()
{
return this.crimetype;
}

public String getDate()
{
return this.date;
}

public String getPlace()
{
return this.place;
}

public String getVictims()
{
return this.victims;
}

public String getSuspects()
{
return this.suspects;
}

public String getStatus()
{
return this.status;
}


public boolean equals(Object o)
{
if ( o instanceof Entry )
{
Entry e = (Entry) o;
return e.getCrime().equalsIgnoreCase(this.crime);
}

return false;
}
}

is something wrong with this file?
*******************************************************

please help me out with this program..and please explain the answer..i also want to understand this program..all i need is a lift, i'll be tryin to solve this problem too, but 2 brains are better than 1, how bout plenty of brains...makes sense 4 me..i need help guys..please help me...

Note: this program runs, but outputs the wrong thing, and some of its basic operations dont work too..
Was This Post Helpful? 0
  • +
  • -

#7 letthecolorsrumble  Icon User is offline

  • Student of The Sun
  • member icon

Reputation: 27
  • View blog
  • Posts: 555
  • Joined: 07-November 07

Re: Help!..I really need someone 2 help me with this one

Posted 27 February 2008 - 06:22 AM

Now you made a mistake! Please use Code tags!
Was This Post Helpful? 0
  • +
  • -

#8 AmitTheInfinity  Icon User is offline

  • C Surfing ∞
  • member icon

Reputation: 117
  • View blog
  • Posts: 1,559
  • Joined: 25-January 07

Re: Help!..I really need someone 2 help me with this one

Posted 27 February 2008 - 07:06 AM

please put your code in [*code=java]Paste your code between these tags[/code*] without using the * in the tags.
Was This Post Helpful? 0
  • +
  • -

#9 Nykc  Icon User is offline

  • Gentleman of Leisure
  • member icon

Reputation: 726
  • View blog
  • Posts: 8,638
  • Joined: 14-September 07

Re: Help!..I really need someone 2 help me with this one

Posted 27 February 2008 - 07:12 AM

:code:
Was This Post Helpful? 0
  • +
  • -

#10 bensongale  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 26-February 08

Re: Help!..I really need someone 2 help me with this one

Posted 27 February 2008 - 07:43 AM

sorry i didnt know that..

Program Description:

Crime Manager
- this program keeps track of the crimes handled by a particular precinct.

Tracked Information:
Date, Place, Case, Victim(s), Suspect(s), Status

Basic Operations:
*add Crime case
*remove Crime case
*edit Crime case
*find Crime case
*brose crimes


I need this in a GUI(graphic user interface) code..
Jtextframe perhaps would do..

i really need this one guys..
i hope u could help me..
thanx.. smile.gif

-this is CrimeManager.java file
import java.util.*;
import java.io.*;
import java.lang.String;


public class CrimeManager
{
	private static final String FILENAME = "crimemanager.dat";
	private static final String WORD_SEPARATOR = "=>";
	private ArrayList<Entry> entries;

	public CrimeManager()
	{
		load();
	}

	private void load()
	{
		try
		{
			Scanner file = new Scanner(new FileReader(FILENAME));
			entries = new ArrayList<Entry>();
			String line;
			String crime;
			String date;
			String place;
			String crimetype;
			String victims;
			String suspects;
			String status;

			String[] cc;

			while(file.hasNextLine())
			{
				line = file.nextLine();
				if (line.trim().length()>0)
				{
					cc = line.split(WORD_SEPARATOR);
					if (cc.length>=7)
					{
						crime = cc[0];
						crimetype = cc[1];
						date = cc[2];
						place = cc[3];
						victims = cc[4];
						suspects = cc[5];
						status = cc[6];
						addEntry(crime,crimetype,date,place,victims,suspects,status);
					}
				}
			}
			file.close();
		}
		catch(Exception ex)
		{
			ex.printStackTrace();
		}
	}

	private void save()
	{
		try
		{
			PrintWriter writer = new PrintWriter(FILENAME);
			for(Entry e : entries)
			{
				writer.println(e.getCrime() + WORD_SEPARATOR + e.getDate() + e.getPlace() + e.getCrimetype() + e.getVictims() + e.getSuspects() + e.getStatus());
			}
			writer.close();
		}
		catch(Exception ex)
		{
			ex.printStackTrace();
		}
	}

	public void addEntry(String crime, String date, String place, String crimetype, String victims, String suspects, String status)
	{
		Entry e = new Entry();
		e.setCrime(crime);
		e.setDate(date);
		e.setPlace(place);
		e.setCrimetype(crimetype);
		e.setVictims(victims);
		e.setSuspects(suspects);
		e.setStatus(status);

		entries.add(e);

		save();
	}

	public void deleteEntry(String crime)
	{
		int index = -1;
		for(int i = 0; i<entries.size(); i++)
		{
			Entry e = (Entry) entries.get(i);
			if (e.getCrime().equalsIgnoreCase(crime))
			{
				index = i;
				break;
			}
		}

		if (index != -1)
		{
			entries.remove(index);
		}
		save();
	}


	public String getCrimetype(String crime)
	{
		for(Entry e : entries)
		{
			if (e.getCrime().equalsIgnoreCase(crime))
			{
				return e.getCrimetype();
			}
		}
		return null;
	}

	public String getDate(String date)
	{
		for(Entry e : entries)
		{
			if (e.getCrime().equalsIgnoreCase(crime))
			{
				return e.getDate();
			}
		}
		return null;
	}

	public String getPlace(String crime)
	{
		for(Entry e : entries)
		{
			if (e.getCrime().equalsIgnoreCase(crime))
			{
				return e.getPlace();
			}
		}
		return null;
	}

	public String getVictims(String crime)
	{
		for(Entry e : entries)
		{
			if (e.getCrime().equalsIgnoreCase(crime))
			{
				return e.getVictims();
			}
		}
		return null;
	}

	public String getSuspects(String crime)
		{
			for(Entry e : entries)
			{
				if (e.getCrime().equalsIgnoreCase(crime))
				{
					return e.getSuspects();
				}
			}
			return null;
	}

	public String getStatus(String crime)
		{
			for(Entry e : entries)
			{
				if (e.getCrime().equalsIgnoreCase(crime))
				{
					return e.getStatus();
				}
			}
			return null;
	}


	public void editEntry(String crime, String crimetype,String date, String place, String victims, String suspects, String status )
	{
		int index = -1;
		for(int i = 0; i<entries.size(); i++)
		{
			Entry e = (Entry) entries.get(i);
			if (e.getCrime().equalsIgnoreCase(crime))
			{
				index = i;
				break;
			}
		}
		if (index !=-1)
		{
			Entry e = (Entry) entries.get(index);
			e.setCrimetype(crimetype);
			e.setDate(date);
			e.setPlace(place);
			e.setVictims(victims);
			e.setSuspects(suspects);
			e.setStatus(status);

			entries.set(index, e);
			save();
		}
	}

	public ArrayList<Entry> getList()
	{
		return entries;
	}




	public static void main(String[] args) throws Exception
	{
		CrimeManager english = new CrimeManager();
		Scanner console = new Scanner(System.in);
		String input;
		String crimetype;
		String crime;
		String date;
		String place;
		String victims;
		String suspects;
		String status;

		System.out.println(" ** ** ** ** ** ** ** ** **");

		System.out.println("Welcome to UC Crime Manager");
		do
		{
			System.out.println("Select a Choice, then Press ENTER");
			System.out.println("  1 Add Crime Case ");
			System.out.println("  2 Remove Crime Case");
			System.out.println("  3 Edit Crime Case");
			System.out.println("  4 Find Crime Case");
			System.out.println("  5 Browse Crime Case");
			System.out.println();
			System.out.println(" 0 Program Terminated");
			System.out.print("--> ");

			input = console.nextLine();
			if (input.equals("0"))
			{
				break;
			}
			else if (input.equals("1"))
			{
				System.out.println("Enter new crime:");
				crime = console.nextLine();
				System.out.println("Enter new date:");
				date = console.nextLine();
				System.out.println("Enter new place:");
				place = console.nextLine();
				System.out.println("Enter new victim(s):");
				victims = console.nextLine();
				System.out.println("Enter new suspect(s):");
				suspects = console.nextLine();
				System.out.println("Enter new status:");
				status = console.nextLine();
				crimetype = english.getCrimetype(crime);
				if (crimetype != null)
				{
				System.out.println("> " + crime + " is already on the Crime Manager.");
				}
				else
				{
				System.out.print("Enter crimetype:");
				crimetype = console.nextLine();
				english.addEntry(crime,crimetype,date,place,victims,suspects,status);
				System.out.println("> " + crime + " is added to the Crime Manager.");
				}

			}
			else if (input.equals("2"))
			{
				System.out.print("Enter crime to be removed:");
				crime = console.nextLine();
				crimetype = english.getCrimetype(crime);
				if (crimetype != null)
				{
				english.deleteEntry(crime);
					System.out.println("  " + crime + " is removed from the Crime Manager.");
				}
				else
				{
					System.out.println("> " + crime + " is not on the Crime Manager.");
				}
			}
			else if (input.equals("3"))
			{
				System.out.print("Enter crime to be changed:");
				crime = console.nextLine();
				crimetype = english.getCrimetype(crime);
				if (crimetype != null)
				{
					System.out.print("Enter new crimetype:");
					crimetype = console.nextLine();
					date = console.nextLine();
					place = console.nextLine();
					victims = console.nextLine();
					suspects = console.nextLine();
					status = console.nextLine();
					english.editEntry(crime,crimetype,date,place,victims,suspects,status);
					System.out.println("> " + crime + "'s crimetype is changed successfully.");
				}
				else
				{
					System.out.println("> " + crime + " is not on the Crime Manager.");
				}
			}
			else if (input.equals("4"))
			{
				System.out.print("Find Crime:");
				crime = console.nextLine();
				crimetype = english.getCrimetype(crime);
				date = english.getDate(crime);
				place = english.getPlace(crime);
				victims = english.getVictims(crime);
				suspects = english.getSuspects(crime);
				status = english.getStatus(crime);
				if (crimetype != null)
					System.out.println("> " + crime + " ==> " + "\n" + "Crimetype:"+ crimetype + "\n"+"Date:" + date + "\n" + "Place:"+ place +"\n"+"Victim(s):" + victims + "\n"+"Suspect(s):" + suspects + "\n"+ "Status:" + status);
				else
					System.out.println("> " + crime + " no such crime in the Crime Manager.");
			}
			else if (input.equals("5"))
			{
				System.out.println();
				for(Entry e : english.getList())
				{
					System.out.println(" " + e.getCrime());
				}
			}
			else
			{
				System.out.println("Invalid option.");
			}
			System.out.println();
		}
		while(!input.equalsIgnoreCase("exit"));
		System.out.println("Thank you for using Crime Manager");
	}
}



-this one is the Entry.java file

public class Entry
{
	private String crime;
	private String date;
	private String place;
	private String crimetype;
	private String victims;
	private String suspects;
	private String status;


	public void setCrime(String crime)
	{
		this.crime = crime;
	}

	public void setCrimetype(String crimetype)
	{
		this.crimetype = crimetype;
	}

	public void setDate(String date)
	{
		this.date = date;
	}

	public void setPlace(String place)
	{
		this.place = place;
	}

	public void setVictims(String victims)
	{
		this.victims = victims;
	}

	public void setSuspects(String suspects)
	{
		this.suspects = suspects;
	}

	public void setStatus(String status)
	{
		this.status = status;
	}

	public String getCrime()
	{
		return this.crime;
	}

	public String getCrimetype()
	{
		return this.crimetype;
	}

	public String getDate()
	{
		return this.date;
	}

	public String getPlace()
	{
		return this.place;
	}

	public String getVictims()
	{
		return this.victims;
	}

	public String getSuspects()
	{
		return this.suspects;
	}

	public String getStatus()
	{
		return this.status;
	}


	public boolean equals(Object o)
	{
		if ( o instanceof Entry )
		{
			Entry e = (Entry) o;
			return e.getCrime().equalsIgnoreCase(this.crime);
		}

		return false;
	}
}



Note:
-this program has no errors, i was able to make it run
-the problem is, it outputs the wrong thing
for example:
Crimetype: Philippines //wrong
Date: Rape //wrong
Place: July 1, 2007 //wrong
Victims: Martinez //correct
Suspecs: Vasay //correct
Status: Unsolved //correct
its messed up, its scrambled, but i dont see any error on my code, i dont know whats wrong, bcoz the program runs..its a simple print code so i know how to code it, but it dosnt print the right thing...
-some of its basic operations(which are stated above)dont work
for example:
Browse wont work
Remove wont work
Edit works
add works
find also works
-another things is that tha program dosnt update,
for example:
i entered the crime RAPE
Rape will now be one of the crimes in crimemanager.dat file with its corresponding information(date,place,victims etc.)
but after i exit the program..rape will not be saved to the program..so i have to type it again and again..it dosn't update..
how can i do that?
Was This Post Helpful? 0
  • +
  • -

#11 bensongale  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 26-February 08

Re: Help!..I really need someone 2 help me with this one

Posted 27 February 2008 - 07:53 AM

can I ask another question?
how did u guys put some graphics in your signatures..
are you gonna put the code inside tags too?
Was This Post Helpful? 0
  • +
  • -

#12 Nykc  Icon User is offline

  • Gentleman of Leisure
  • member icon

Reputation: 726
  • View blog
  • Posts: 8,638
  • Joined: 14-September 07

Re: Help!..I really need someone 2 help me with this one

Posted 27 February 2008 - 07:57 AM

In the member panel there is a link entitled edit signature. You can add the image there.
Was This Post Helpful? 0
  • +
  • -

#13 bensongale  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 26-February 08

Re: Help!..I really need someone 2 help me with this one

Posted 28 February 2008 - 06:16 PM

guys please help me out with this one..

please please please..
so far i didnt see anyone helping me out..

come on.. guys ... help :crazy:
Was This Post Helpful? 0
  • +
  • -

#14 Nykc  Icon User is offline

  • Gentleman of Leisure
  • member icon

Reputation: 726
  • View blog
  • Posts: 8,638
  • Joined: 14-September 07

Re: Help!..I really need someone 2 help me with this one

Posted 28 February 2008 - 06:38 PM

I could be wrong but from what it looks like this is your teachers code and you have yet to put forth any effort of your own. We are not here to do your homework. we will help you, but you need to put forth an honest effort.

Read your signature, it says a lot!
Was This Post Helpful? 0
  • +
  • -

#15 bensongale  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 26-February 08

Re: Help!..I really need someone 2 help me with this one

Posted 29 February 2008 - 07:17 PM

that's not my teachers code man..
his code was about a dictionary..
if u read the whole code its about crime manager.
he told us to base our codes from his example..
that's why most of the class used his code as a guide.
and thats what i did..
i somehow managed to run that program bcoz of my own effort..
but its ok..if no ones gonna help me..
then i'l just try to do this on my own..

someone told me this net can help..
but i guesss i just wasted time..
thnx 4 all the help guys..

this site is full of instructions, no help related to our projects..
read the code man..that's my code...
it runs bcoz i know the process..
but i dont know what the codes to input..
anywayz..thank you..
sorry if i wasted ur tym..

:v:

This post has been edited by bensongale: 29 February 2008 - 07:19 PM

Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2