Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old April 24th, 2012, 01:01 PM
hope aa hope aa is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 5 hope aa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 35 sec
Reputation Power: 0
Exclamation Homework - Help me fast

i need help and i need it fast
the subject is that my friend need a help with his assignment in Java but he don't know that much in Java and he need the result today it is a real deal the assignment is like this
A personnel system in a company stores the following fields for each employee record:
- Empolyee_Record:
1-Name.
2-EMP_Number.
3-Birth_date.
4-Salary_Amount.
Create a complete java program that enables you to do the following:
1 Store 30 Empolyee_Records in an array of data type object.
2 Perform the following array operations:
3.1 Insert a new Employee record .
3.2 Delete an Employee record.
3.3 Search for an Employee record using the Binary search method.
3.4 Search for an Employee record using the linear search method.
3.6 Display a selected Empolyee_Record or records.
3.7 Sort the records using Merging algorithm.
3 Use a suitable Frame; create a MENU for the array operations.
and i am realy sorry for interrupt you and if it OK with you i need it today
thank you very much
this assignment must be submet it tmorrow so can you help me pleas??

Reply With Quote
  #2  
Old April 24th, 2012, 01:59 PM
NormR's Avatar
NormR NormR is offline
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Aug 2010
Location: Eastern Florida
Posts: 2,952 NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 2 h 33 m 55 sec
Reputation Power: 345
Do you have any specific java programming questions about your assignment?
Please post your code and question.

Reply With Quote
  #3  
Old April 24th, 2012, 08:01 PM
macano macano is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Location: Germany
Posts: 4 macano User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 36 sec
Reputation Power: 0
Send a message via MSN to macano Send a message via Skype to macano
Quote:
Originally Posted by NormR
Do you have any specific java programming questions about your assignment?
Please post your code and question.


This, post all your information about your assignment. I can't really understand what you want, and what you have at the moment.

Reply With Quote
  #4  
Old April 24th, 2012, 08:09 PM
hope aa hope aa is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 5 hope aa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 35 sec
Reputation Power: 0
you whant the truth i need help from zero because i dont know how to do it at all

Reply With Quote
  #5  
Old April 24th, 2012, 08:33 PM
NormR's Avatar
NormR NormR is offline
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Aug 2010
Location: Eastern Florida
Posts: 2,952 NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 2 h 33 m 55 sec
Reputation Power: 345
What do you have now? Post your current code and questions.

Reply With Quote
  #6  
Old April 24th, 2012, 08:46 PM
ishnid's Avatar
ishnid ishnid is offline
kill 9, $$;
Dev Shed God 4th Plane (6500 - 6999 posts)
 
Join Date: Sep 2001
Location: Shanghai, An tSín
Posts: 6,894 ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level) 
Time spent in forums: 4 Months 2 Weeks 1 Day 22 h 14 m 53 sec
Reputation Power: 3885
Quote:
Originally Posted by hope aa
you whant the truth i need help from zero because i dont know how to do it at all

Ok, so you need to break it down step-by-step.

Quote:
1 Store 30 Empolyee_Records in an array of data type object.

So the first thing is: do you know how to create an array?

Reply With Quote
  #7  
Old April 24th, 2012, 10:06 PM
hope aa hope aa is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 5 hope aa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 35 sec
Reputation Power: 0
i have this programe and i have many question

the programe:

import java.awt.*;
import java.awt.event.*;
import java.io.*;
import javax.swing.*;
import javax.swing.border.*;
import java.util.Scanner;

public class Assignment4 extends JFrame {



static PrintWriter output1 , output2, output3;




static CoursePanel cpanel = new CoursePanel();
static JTextArea arr=new JTextArea(30,40);

static JLabel jblSGR = new JLabel(" Gender ");

static JLabel jblSMJ = new JLabel("Choice ");

static String[] Gender = {"Male","Female"};
static JComboBox jcbSGR = new JComboBox(Gender);
static JComboBox jcbSMJ = new JComboBox(new String[]{"insert","delete","Binary search","Linear search"});

static JButton jbtSave = new JButton("Save");
static JButton jbtCancel = new JButton("Cancel");
static JButton jbtExit = new JButton("Exit");
static JPanel jpMain1, jpMain3;
static Assignment4 frame;


/** Main method */
public static void main(String[] args) throws Exception {


frame = new Assignment4();
frame.pack();
frame.setTitle("College of Applied Sciences - Sohar");
frame.setLocationRelativeTo(null); // Center the frame
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);




final JButton print = new JButton("print");
final JButton c = new JButton("cancel");
final JPanel button = new JPanel();
button.add(print);
button.add(c);
final JPanel qq = new JPanel();
JLabel q = new JLabel(" Do you want to print Data Of Student? ");
qq.add(q);



// Register listener
jcbSMJ.addItemListener(new ItemListener() {
public void itemStateChanged(ItemEvent e) {
setDisplay(jcbSMJ.getSelectedIndex());
}
});

jbtSave.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {





c.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.exit(0);

}});


}
});


jbtCancel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {

CoursePanel.jtfC1.setText(null);
CoursePanel.jtfC2.setText(null);
CoursePanel.jtfC3.setText(null);
CoursePanel.jtfC4.setText(null);



}
});


}



public Assignment4() {
// Create a new panel to hold label and text field
jpMain1 = new JPanel();
JPanel jpMain11 = new JPanel();
JPanel jpMain12 = new JPanel();

jpMain3 = new JPanel();
jpMain3.setLayout(new BorderLayout());
JPanel jpMain31 = new JPanel();
jpMain31.setLayout(new FlowLayout());

jpMain31.add(jbtSave);
jpMain31.add(jbtCancel);
jpMain31.add(jbtExit);
JPanel jpMain32 = new JPanel();
final JLabel jblMessage = new JLabel(" ");
jpMain32.add(jblMessage);
jpMain3.add(jpMain31,BorderLayout.NORTH);
jpMain3.add(jpMain32,BorderLayout.CENTER);

jpMain1.setLayout(new BorderLayout(5,0));
jpMain11.setLayout(new FlowLayout(FlowLayout.LEFT));
jpMain12.setLayout(new FlowLayout(FlowLayout.LEFT));
jpMain11.add(arr);


jpMain12.add(jblSGR);
jpMain12.add(jcbSGR);
jpMain12.add(jblSMJ);
jpMain12.add(jcbSMJ);

jpMain1.add(jpMain11,BorderLayout.NORTH);
jpMain1.add(jpMain12, BorderLayout.CENTER);


setDisplay(0);
setLayout(new BorderLayout());
add(jpMain1,BorderLayout.NORTH);
add(cpanel,BorderLayout.CENTER);
add(jpMain3,BorderLayout.SOUTH);
}


static void setDisplay(int index){
if (index == 0){
cpanel.setTitle1("ID","NAME","SALARY","BIRTH DATE");
cpanel.setBorder(new TitledBorder("INSERT"));
}
else if (index == 1){
cpanel.setTitle11("POSITION");
cpanel.setBorder(new TitledBorder("DELETE"));
}
else if (index == 2){
cpanel.setTitle2("TARGET");
cpanel.setBorder(new TitledBorder("BINARY SEARCH"));
}
else if (index == 2){
cpanel.setTitle2("TARGET");
cpanel.setBorder(new TitledBorder("LINEAR SEARCH"));
}
}

}

class CoursePanel extends JPanel{
JLabel jblC1 = new JLabel();
JLabel jblC2 = new JLabel();
JLabel jblC3 = new JLabel();
JLabel jblC4 = new JLabel();
static JButton insert = new JButton("Insert");
static JButton delete = new JButton("Delete");
static JButton binary = new JButton("search1");
static JButton linear = new JButton("search2");
static JTextField jtfC1 = new JTextField(1);
static JTextField jtfC2 = new JTextField(1);
static JTextField jtfC3 = new JTextField(1);
static JTextField jtfC4 = new JTextField(1);
private Component add;

public CoursePanel(){
setLayout(new GridLayout(6,5));
add(jblC1);
add(jtfC1);
add(jblC2);
add(jtfC2);
add(jblC3);
add(jtfC3);
add(jblC4);
add(jtfC4);
add(insert);
add(delete);
add(binary);
add(linear);

}
public void setTitle11(String title1) {
jblC1.setText(title1);
insert.add(insert);
jtfC2.setEditable(false);
jtfC3.setEditable(false);
jtfC4.setEditable(false);
}
public void setTitle1(String title1,String title2,String title3, String title4){
jblC1.setText(title1);
jblC2.setText(title2);
jblC3.setText(title3);
jblC4.setText(title4);

jtfC4.setEditable(true);
}
public void setTitle2(String title1){
jblC1.setText(title1);


jtfC2.setEditable(false);
jtfC3.setEditable(false);
jtfC4.setEditable(false);

repaint();
}
}

my question is when i clik insert button i whant to save information in array and thin retrive it in textArea

and if i whant to delete what i inert how can i do that????

Reply With Quote
  #8  
Old April 24th, 2012, 11:53 PM
ishnid's Avatar
ishnid ishnid is offline
kill 9, $$;
Dev Shed God 4th Plane (6500 - 6999 posts)
 
Join Date: Sep 2001
Location: Shanghai, An tSín
Posts: 6,894 ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level)ishnid User rank is General 44th Grade (Above 100000 Reputation Level) 
Time spent in forums: 4 Months 2 Weeks 1 Day 22 h 14 m 53 sec
Reputation Power: 3885
IMO you're doing this backwards. I'd suggest taking the steps in the same order as in the assignment. The UI should be the last thing you add after you've developed the mechanism to store the Employee objects and perform your array operations.

Reply With Quote
  #9  
Old April 25th, 2012, 12:40 AM
hope aa hope aa is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 5 hope aa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 35 sec
Reputation Power: 0
it does not mater any mor what i want is how to save user input in array after cliking save or insert

Reply With Quote
  #10  
Old April 25th, 2012, 12:53 AM
hope aa hope aa is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 5 hope aa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 45 m 35 sec
Reputation Power: 0
i have all the operation put i cant compin them together thats the problem
can yuo help pleas it is ergent

Reply With Quote
  #11  
Old April 25th, 2012, 05:54 AM
NormR's Avatar
NormR NormR is offline
Contributing User
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Aug 2010
Location: Eastern Florida
Posts: 2,952 NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level)NormR User rank is Major (30000 - 40000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 2 h 33 m 55 sec
Reputation Power: 345
If you are getting compiler errors, please copy and paste them here if you want help fixing them.

Please edit your post and wrap the code in code tags. Use the Go Advanced button and then the #icon above the input box.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Homework - Help me fast

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap