Question about Linked Lists

I'm doing an assignment on linked lists and I'm having trouble understanding the insert method. I'm using the one from the book and it works fine, but I don't quite understand it.
public void insert(Object o) {
Node n = new Node(o,current);
if (previous == null)
head = n;
else
previous.next = n;
current = n;
It's my understanding that current is the value that your currently at in the list. Previous is equal to the value before the current. So, previous.next is equal to current. This reasoning won't make the list progress with this code. Can someone tell me what I'm not understanding, or explain how this progresses?

Thanks, that helps alot. Now, I have another question. I need to add and remove nodes from the list. I have it setup where the user can choose what node to delete. It compiles and runs fine, but when I try to delete a node, it doesn't delete it. Doing some troubleshooting, I found that it gets into the for loop, but doesn't do anything with the if/else statement. I put a printline in the if and else part, and it never printed out the statement in the if statement or in the else statement. Here's the code I'm using. getLentgh() is a method I wrote to return an integer value of how many nodes are in the list. I've also tried putting in a printline after the for loop, but still in the try, it didn't print it out.
else if(source == remove) {
String del = JOptionPane.showInputDialog("Enter an integer to remove.");
Node temp = new Node(del,current);
if(del != null){
try{
     for(int c = 0; c < list.getLength(); c++){            
     if(temp.data == current.data){
          list.remove();
          c = list.getLength();
     else{
          list.advance();     
}catch(NullPointerException e){
}

Similar Messages

  • Quick Question about linked lists

    If I have a linked list can i save it to a file directly with the Serializable interface or would I have to iterate through each element and write each element to the file?

    yeah, it seems as though I can
    However, I am having a problem reading it back. I guess I don't know how to initialize the values in the list, as it doens't recognize anything until I add an item to it and it adds this item to the front, then any other items after that it will add to the back, when i want this first addition to be in the back as well.
    when I initialize the class i call
    list.add(loadList());
    loadList()
    public MyList loadList() {
               try {
                 FileInputStream fis = new FileInputStream("data.dat");
                 ObjectInputStream in = new ObjectInputStream(fis);
                 list = (MyList)in.readObject();
                 in.close();
                 return list;
               catch (Exception e) {
                   System.out.println(e);
              return list;
           }list.add()
    public void add(int index, Object o)
              if (index == 0) addFirst(o);
              else if (index >= size) addLast(o);
              else {
                   Node current = first;
                   for (int i = 1; i < index; i++)
                        current.prev = current;
                        current = current.next;
                   Node temp = current.next;
                   current.next = new Node(o);
                   current.prev = current;
                   (current.next).next = temp;
                   size++;
         }any ideas?

  • Please Hilp me ( about linked list)

    i am an university student
    i was write a proram by ( arrays)
    thes program about Employees ( Add , Searsh , displly , delete )
    it is 6 class
    1 = Employee.java
    2 = Boss.java
    3 = CommissionWorker.java
    4 = HourlyWorker.java
    5 = PieceWorker.java
    6 = StartProgram.java
    i wona now changing the program from (Arrays) to (linked list)
    this is the cood

    The last 1
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class StartProgram extends JFrame
              // The Components For Frame 1
              private JLabel Label_Number_Of_Employee ;
              private JTextField Text_Number_Of_Employee ;
              private JButton Button_New, Button_Display, Button_Search, Button_UpData, Button_Delete;
              private JButton Button_Exit, Button_RE;
              private JPanel Panel_1_North, Panel_1_West, Panel_1_South, Panel_1_Center;
              // The Components For Frame 2
              private JLabel Label_Name, Label_Adress, Label_Gread, Label_ID, Label_Salary , Label_Commiss, Label_Quant, Label_Hour, Label_Wage, Label_Pice, Label_Total_Mony, Label_NumberID_FOR_Searsh;
              private JTextField TextField_Total_mony, TextField_Name, TextField_Adress, TextField_Greade,     TextField_ID, TextField_Salary , TextField_Commiss, TextField_Quant, TextField_Hour, TextField_Wage, TextField_Pice, TextField_NumberID_FOR_Searsh;
              private JButton Button_Clear, Button_OK2, Button_Cancel, Button_Next, Button_Prev, Button_Searsh, Button_Save, Button_Delet, Button_Create;
              private JRadioButton rad_Boss, rad_HourlyWorker, rad_PiceWorker, rad_CommissWorker;
              private ButtonGroup radGroup;
              private JPanel Panel_2_Center, Panel_2_South, Panel_2_North;
              // The Container For Frame 1
              Container cont;
              // The Container For Frame 2
              Container cont2;
              // The Layouts For Frame 1 & 2
              private FlowLayout layout;
              private GridLayout glayout;
              // private class Show_Frame2 extends JFrame
              int ID_Conter_Number[] = new int[1];
              Show_Frame2 Frame_Display;
              Show_Frame2 Frame_Delete;
              Show_Frame2 Frame_UpData;
              Show_Frame2 Frame_Search;
              // VARIABLES
              int Text_Number_TO_int = 0;
              int Countr_Index_Of_ArrayEmp = 0;
              int Number_Chose_Acion;
              int Conter_next = -1;
              int Number_Stop_Create = 0;
              int NumberID_FOR_Searsh = 0 ;
              int Nu_S_S_D_F_T_F_T_T_A; // use in Set_Save_Data_From_Text_Field_To_The_Arayy();
              int Number_Set_Kind_Employee; // use in Set_Save_Data_From_Text_Field_To_The_Arayy();
              int Nu_S_K_E_B_R_S; // use in Set_Kind_Employee_By_radBotton_Selected()
              int Nu_S_D_I_F_T_S_B_S_O_D; // use in Set_Data_in_Folds_To_Show_By_Searsh_Or_Disply()
              // use in Set_Save_Data_From_Text_Field_To_The_Arayy()
              int ID_set_Save_Data;
              int Greade_set_Save_Data;
              String Adress_set_Save_Data;
              String Name_set_Save_Data;
              double Salary_set_Save_Data;
              int Quant_set_Save_Data;
              int Hour_set_Save_Data;
              int Pice_set_Save_Data;
              double Wage_set_Save_Data;
              double Commiss_set_Save_Data;
              double Total_Mony;
              // For updata
              int ID_updata;
              int Greade_updata;
              String Adress_updata;
              String Name_updata;
              double Salary_updata;
              int Quant_updata;
              int Hour_updata;
              int Pice_updata;
              double Wage_updata;
              double Commiss_updata;
              double Total_Mony_updata;
              // Arayy(s) To Keep Elements Data Of Employee
              String ArayyName[];
              String ArayyAdress[];
              int ArayyGreade[];
              int ArayyID[];
              double ArayySalary[];
              double ArayyCommiss[];
              int ArayyQuant[];
              int ArayyHour[];
              double ArayyWage[];
              int ArayyPice[];
              int ArayyKind_Emp[];
              // Arayy(s)2 To Keep A Copy Of Elements Data Of Employee
              // Use in Delete Action
              String ArayyName_Copy[];
              String ArayyAdress_Copy[];
              int ArayyGreade_Copy[];
              int ArayyID_Copy[];
              double ArayySalary_Copy[];
              double ArayyCommiss_Copy[];
              int ArayyQuant_Copy[];
              int ArayyHour_Copy[];
              double ArayyWage_Copy[];
              int ArayyPice_Copy[];
              int ArayyKind_Emp_Copy[];
              // CONSRUCTOR of StartProgram class
              // Open form1
              public StartProgram()
                        super("Start To Employee System Control");
                        cont = getContentPane();
                        Panel_1_North = new JPanel();      Panel_1_North.setLayout(new GridLayout(3,0,0,0));
                        Panel_1_Center = new JPanel();          Panel_1_Center.setLayout(new GridLayout(6,0,0,0));
                        Panel_1_South = new JPanel();          Panel_1_South.setLayout(new GridLayout(1,0,0,0));
                        Label_Number_Of_Employee = new JLabel("Enter The Number Of Employees Then Press (ENTER) In Your KeyBoard ! ");
                        Text_Number_Of_Employee = new JTextField(10);
                        // 1- Display Button Choice To Employee System Control in form1
                        // 2- set Buttons Edit = false
                        Button_New = new JButton("Create a new an Employee(s) ");     Button_New.setVisible(false);
                        Button_Display = new JButton("Display an Employee(s) ");     Button_Display.setVisible(false);
                        Button_Search = new JButton("Search for an Employee(s) ");     Button_Search.setVisible(false);
                        Button_UpData = new JButton("UpData for an Employee(s) ");     Button_UpData.setVisible(false);
                        Button_Delete = new JButton("Delete an Employee(s) "); Button_Delete.setVisible(false);
                        // 1- Display Button ( EXIT & START AGEN ) in form1
                        // 2- set Buttons Edit = false
                        Button_Exit = new JButton("EXIT");     Button_Exit.setEnabled(false);
                        Button_RE = new JButton("START AGEN");     Button_RE.setEnabled(false);
                        // an object from the private class ActionHandler
                        ActionHandler handler = new ActionHandler();
                        Button_New.addActionListener(handler);
                        Button_Display.addActionListener(handler);
                        Button_Search.addActionListener(handler);
                        Button_UpData.addActionListener(handler);
                        Button_Delete.addActionListener(handler);
                        Button_Exit.addActionListener(handler);
                        Button_RE.addActionListener(handler);
                        Text_Number_Of_Employee.addActionListener(handler);
                        // Add all objects in form1
                        Panel_1_North.add(Label_Number_Of_Employee);
                        Panel_1_North.add(Text_Number_Of_Employee);
                        Panel_1_Center.add(Button_New);
                        Panel_1_Center.add(Button_Display);
                        Panel_1_Center.add(Button_Search);
                        Panel_1_Center.add(Button_UpData);
                        Panel_1_Center.add(Button_Delete);
                        Panel_1_South.add(Button_Exit);
                        Panel_1_South.add(Button_RE);
                        cont.add(Panel_1_North , BorderLayout.NORTH);
                        cont.add(Panel_1_Center , BorderLayout.CENTER);
                        cont.add(Panel_1_South , BorderLayout.SOUTH);
                        // setting of form1
                        setSize(450,350);
                        setVisible(true);
                        setResizable(false);
              } // END public StartProgram()
              private class ActionHandler implements ActionListener
                        public void actionPerformed(ActionEvent EEEE)
                                  // ================================================
                                  // ================================================
                                  // if user Put A Number Then He clock Enter
                                  if(EEEE.getSource() == Text_Number_Of_Employee)
                                            Set_Enter_Number_Of_Employee_Start();
                                  // ================================================
                                  // ================================================
                                  // Or if user clock Button Exit
                                  else if(EEEE.getSource() == Button_Exit)
                                            System.gc();
                                            System.exit(0);
                                  // ================================================
                                  // ================================================
                                  // if user clock Button RE START
                                  if(EEEE.getSource() == Button_RE)
                                            Set_Program_Start_Agen();
                                  // ================================================
                                  // ================================================
                                  // if user clock Button Create a new Employee
                                  if(EEEE.getSource() == Button_New)
                                            Number_Chose_Acion = 1;
                                            Show_Frame2 CCCC = new Show_Frame2();
                                  // ================================================
                                  // ================================================
                                  // if user clock Button Display The Employee
                                  if(EEEE.getSource() == Button_Display)
                                            Number_Chose_Acion = 2;
                                            Show_Frame2 CCCC = new Show_Frame2();
                                  // ================================================
                                  // ================================================
                                  // if user clock Button Search The Employee
                                  if(EEEE.getSource() == Button_Search)
                                            Number_Chose_Acion = 3;
                                            Show_Frame2 CCCC = new Show_Frame2();
                                  // ================================================
                                  // ================================================
                                  // if user clock Button UpData The Employee
                                  if(EEEE.getSource() == Button_UpData)
                                            Number_Chose_Acion = 4;
                                            Show_Frame2 CCCC = new Show_Frame2();
                                  // ================================================
                                  // ================================================
                                  // if user clock Button Delete
                                  if(EEEE.getSource() == Button_Delete)
                                            Number_Chose_Acion = 5;
                                            Show_Frame2 CCCC = new Show_Frame2();
                        } // END public void actionPerformed(ActionEvent e)
              } // END private class ActionHandler implements ActionListener
              public void Set_Enter_Number_Of_Employee_Start()
                        try
                                  Text_Number_TO_int = Integer.parseInt(Text_Number_Of_Employee.getText());
                                  if(Text_Number_TO_int <= 0)
                                            Text_Number_Of_Employee.setText("ERROR !! Please Enter a Number More Than 0");
                                  else
                                            Set_Create_Lingth_Of_Arayy_By_Number_That_Entered();
                        catch(NumberFormatException nfe)
                                  Text_Number_Of_Employee.setText("ERROR !! Please Enter a Number");
              public void Set_Create_Lingth_Of_Arayy_By_Number_That_Entered()
                        ID_Conter_Number = new int[Text_Number_TO_int];
                        Text_Number_Of_Employee.setEditable(false);
                        Button_New.setVisible(true);
                        Button_Display.setVisible(true);
                        Button_Search.setVisible(true);
                        Button_UpData.setVisible(true);
                        Button_Delete.setVisible(true);
                        Button_Exit.setEnabled(true);
                        Button_RE.setEnabled(true);
                        ArayyName = new String[Text_Number_TO_int];
                        ArayyAdress = new String[Text_Number_TO_int];
                        ArayyGreade = new int[Text_Number_TO_int];
                        ArayyID = new int[Text_Number_TO_int];
                        ArayySalary = new double[Text_Number_TO_int];
                        ArayyCommiss = new double[Text_Number_TO_int];
                        ArayyQuant = new int[Text_Number_TO_int];
                        ArayyHour = new int[Text_Number_TO_int];
                        ArayyWage = new double[Text_Number_TO_int];
                        ArayyPice = new int[Text_Number_TO_int];
                        ArayyKind_Emp = new int[Text_Number_TO_int];
              public void Set_Program_Start_Agen()
                        Text_Number_Of_Employee.setEditable(true);
                        Text_Number_Of_Employee.setText("");
                        Countr_Index_Of_ArrayEmp = 0;
                        Conter_next = -1;
                        Text_Number_TO_int = 0;
                        Countr_Index_Of_ArrayEmp = 0;
                        Conter_next = -1;
                        Nu_S_S_D_F_T_F_T_T_A = 0;
                        Number_Set_Kind_Employee = 0;
                        Number_Stop_Create = 0;
                        ArayyName = null ;
                        ArayyAdress = null ;
                        ArayyGreade = null ;
                        ArayyID = null ;
                        ArayySalary = null ;
                        ArayyCommiss = null ;
                        ArayyQuant = null ;
                        ArayyHour = null ;
                        ArayyWage = null ;
                        ArayyPice = null ;
                        ArayyKind_Emp = null ;
                        ArayyName_Copy = null ;
                        ArayyAdress_Copy = null ;
                        ArayyGreade_Copy = null ;
                        ArayyID_Copy = null ;
                        ArayySalary_Copy = null ;
                        ArayyCommiss_Copy = null ;
                        ArayyQuant_Copy = null ;
                        ArayyHour_Copy = null ;
                        ArayyWage_Copy = null ;
                        ArayyPice_Copy = null ;
                        ArayyKind_Emp_Copy = null ;
                        ID_set_Save_Data = 0;
                        Greade_set_Save_Data = 0;
                        Adress_set_Save_Data = null;
                        Name_set_Save_Data = null;
                        Salary_set_Save_Data = 0.00;
                        Quant_set_Save_Data = 0;
                        Hour_set_Save_Data = 0;
                        Pice_set_Save_Data = 0;
                        Wage_set_Save_Data = 0.00;
                        Commiss_set_Save_Data = 0.00;
              // Whin User Click Any rad Button
              private class RadHandler implements ItemListener
                        public void itemStateChanged(ItemEvent i)
                                  Set_All_Text_Field_To_Defolt_Text();
                                  TextField_Name.setEditable(true);
                                  TextField_Adress.setEditable(true);
                                  TextField_Greade.setEditable(true);
                                  if(i.getSource() == rad_Boss)
                                            TextField_Salary.setEditable(true);
                                            TextField_Wage.setEditable(false);
                                            TextField_Commiss.setEditable(false);
                                            TextField_Quant.setEditable(false);
                                            TextField_Hour.setEditable(false);
                                            TextField_Pice.setEditable(false);
                                  else if(i.getSource() == rad_HourlyWorker)
                                            TextField_Salary.setEditable(false);
                                            TextField_Wage.setEditable(true);
                                            TextField_Hour.setEditable(true);
                                            TextField_Commiss.setEditable(false);
                                            TextField_Quant.setEditable(false);
                                            TextField_Pice.setEditable(false);
                                  else if(i.getSource() == rad_PiceWorker)
                                            TextField_Salary.setEditable(false);
                                            TextField_Wage.setEditable(true);
                                            TextField_Hour.setEditable(false);
                                            TextField_Quant.setEditable(false);
                                            TextField_Commiss.setEditable(false);
                                            TextField_Pice.setEditable(true);
                                  else if(i.getSource() == rad_CommissWorker)
                                            TextField_Salary.setEditable(true);
                                            TextField_Wage.setEditable(false);
                                            TextField_Hour.setEditable(false);
                                            TextField_Quant.setEditable(false);
                                            TextField_Commiss.setEditable(true);
                                            TextField_Pice.setEditable(true);
              private class Show_Frame2 extends JFrame
                        public Show_Frame2()
                                  super("Control Panal Of Employee's Data");
                                  cont2 = getContentPane();
                                  Panel_2_Center = new JPanel();
                                  Panel_2_Center.setLayout(new GridLayout(11,2,5,5));
                                  Panel_2_South = new JPanel();
                                  Panel_2_South.setLayout(new GridLayout(2,5,5,5));
                                  Panel_2_North = new JPanel();
                                  Panel_2_North.setLayout(new GridLayout(2,1,5,5));
                                  Label_NumberID_FOR_Searsh = new JLabel("Employee's ID :", SwingConstants.RIGHT);
                                  Label_NumberID_FOR_Searsh.setVisible(false);
                                  TextField_NumberID_FOR_Searsh = new JTextField(5);
                                  TextField_NumberID_FOR_Searsh.setVisible(false);
                                  TextField_NumberID_FOR_Searsh.setEditable(false);
                                  Label_Name = new JLabel("Name : " , SwingConstants.RIGHT);
                                  Label_Adress = new JLabel("Address : " , SwingConstants.RIGHT);
                                  Label_Gread = new JLabel("Greade : " , SwingConstants.RIGHT);
                                  Label_ID = new JLabel("ID : " , SwingConstants.RIGHT);
                                  Label_Salary = new JLabel("Salary : " , SwingConstants.RIGHT);
                                  Label_Commiss = new JLabel("Commiss : " , SwingConstants.RIGHT);
                                  Label_Quant = new JLabel("Quant : " , SwingConstants.RIGHT);
                                  Label_Hour = new JLabel("Hours : " , SwingConstants.RIGHT);
                                  Label_Wage = new JLabel("Wage : " , SwingConstants.RIGHT);
                                  Label_Pice = new JLabel("Pice : " , SwingConstants.RIGHT);
                                  Label_Total_Mony = new JLabel("Total_Money : " , SwingConstants.RIGHT);
                                  TextField_Name = new JTextField(45);
                                  TextField_Adress = new JTextField(45);
                                  TextField_Greade = new JTextField(2);
                                  TextField_ID = new JTextField(4);
                                  TextField_Salary = new JTextField(10);
                                  TextField_Commiss = new JTextField(10);
                                  TextField_Quant = new JTextField(10);
                                  TextField_Hour = new JTextField(10);
                                  TextField_Wage = new JTextField(10);
                                  TextField_Pice = new JTextField(10);
                                  TextField_Total_mony = new JTextField(10); TextField_Total_mony.setEditable(false);
                                  rad_Boss = new JRadioButton("Boss" , false);
                                  rad_HourlyWorker = new JRadioButton("Hourly" , false);
                                  rad_PiceWorker = new JRadioButton("Pice" , false);
                                  rad_CommissWorker = new JRadioButton("Commiss" , false);
                                  radGroup = new ButtonGroup();
                                  radGroup.add(rad_Boss);
                                  radGroup.add(rad_HourlyWorker);
                                  radGroup.add(rad_PiceWorker);
                                  radGroup.add(rad_CommissWorker);
                                  //handler is object of private class RadHandler
                                  RadHandler rHandler = new RadHandler();
                                  rad_Boss.addItemListener(rHandler);
                                  rad_HourlyWorker.addItemListener(rHandler);
                                  rad_PiceWorker.addItemListener(rHandler);
                                  rad_CommissWorker.addItemListener(rHandler);
                                  Button_Save = new JButton("Save"); Button_Save.setVisible(false);
                                  Button_Delet = new JButton("Delete"); Button_Delet.setVisible(false);
                                  Button_Searsh = new JButton("Search"); Button_Searsh.setVisible(false);
                                  Button_Next = new JButton("next");
                                  Button_Prev = new JButton("Prev");
                                  Button_Clear = new JButton("Clear");
                                  Button_OK2 = new JButton("OK"); Button_OK2.setEnabled(false);
                                  Button_Cancel = new JButton("Cancel/Menu");
                                  Button_Create = new JButton("Create");
                                  // ================================================
                                  // ================================================
                                  // of usrt click Button Clear
                                  Button_Clear.addActionListener
                                            new ActionListener()
                                                      public void actionPerformed(ActionEvent e)
                                                                Set_Part_Of_Text_Field_Clear_of_Text();
                                  // ================================================
                                  // ================================================
                                  // of usrt click Button Cancel / Menu
                                  Button_Cancel.addActionListener
                                            new ActionListener()
                                                      public void actionPerformed(ActionEvent e)
                                                                setVisible(false);
                                  // ================================================
                                  // ================================================
                                  // 111111111111111111111111111111111111111111111111//
                                  // (Create new Employee)
                                  if (Number_Chose_Acion == 1)
                                            if (Number_Stop_Create >= Text_Number_TO_int)
                                                      JOptionPane.showMessageDialog(cont2, "You Can not add more Employees " , "Createing Will stop",JOptionPane.INFORMATION_MESSAGE);
                                            else
                                                      set_Show_Create_employees_Form();
                                  // ================================================
                                  // ================================================
                                  // 222222222222222222222222222222222222222222222222//
                                  // ( Display Employee)
                                  else if (Number_Chose_Acion == 2)
                                            if (ArayyName[0] == null)
                                                      JOptionPane.showMessageDialog(cont2,"Ther are No Employees to Display", "Exception Display",JOptionPane.ERROR_MESSAGE);
                                            else
                                                      set_Show_Display_employees_Form();
                                  // ================================================
                                  // ================================================
                                  // 333333333333333333333333333333333333333333333333//
                                  // ( Search Employee)
                                  else if (Number_Chose_Acion == 3)
                                            try
                                                      if (ArayyName[0] == null)
                                                                JOptionPane.showMessageDialog(cont2,"Ther are No Employees to Search", "Exception Search",JOptionPane.ERROR_MESSAGE);
                                                      else
                                                                set_Show_Search_employees_Form();
                                            catch (Exception ex)
                                                      JOptionPane.showMessageDialog(cont2,ex, "Exception",JOptionPane.ERROR_MESSAGE);
                                  // ================================================
                                  // ================================================
                                  // 444444444444444444444444444444444444444444444444//
                                  // ( UpData Employee)
                                  else if (Number_Chose_Acion == 4)
                                            try
                                                      if (ArayyName[0] == null)
                                                                JOptionPane.showMessageDialog(cont2,"Ther are No Employees to UpData", "Exception UpData",JOptionPane.ERROR_MESSAGE);
                                                      else
                                                                set_Show_UpData_employees_Form();
                                            catch (Exception ex)
                                                      JOptionPane.showMessageDialog(cont2,ex, "Exception",JOptionPane.ERROR_MESSAGE);
                                  // ================================================
                                  // ================================================
                                  // 555555555555555555555555555555555555555555555555//
                                  // ( Delete Action )
                                  else if (Number_Chose_Acion == 5)
                                            try
                                                      if (ArayyName[0] == null)
                                                                JOptionPane.showMessageDialog(cont2,"Ther are No Employees to Delete", "Exception Delete",JOptionPane.ERROR_MESSAGE);
                                                      else
                                                                set_Show_Delete_employees_Form();
                                            catch (Exception ex)
                                                      JOptionPane.showMessageDialog(cont2,ex, "Exception",JOptionPane.ERROR_MESSAGE);
                                  // ================================================
                                  // ================================================
                        } // END public Show_Frame2()
                        // 11111111111111111111111111111111111111111
                        public void set_Show_Create_employees_Form()
                                  set_Container_Of_Form2();
                                  setTitle("Create employees");
                                  setResizable(false);
                                  setSize(600,500);
                                  setVisible(true);
                                  Set_TextField_Editable_IS_FALSE();
                                  Conter_next = 0;
                                  // whin Fram Create new Employee loading
                                  Button_Next.setEnabled(false);
                                  Button_Prev.setEnabled(false);
                                  // of usrt click Button Create
                                  Button_Create.addActionListener
                                            new ActionListener()
                                                      public void actionPerformed(ActionEvent e)
                                                                // Kind of Employee that will ad is boss
                                                                if(rad_Boss.isSelected() == true)
                                                                          try
                                                                                    int Greade_N = Integer.parseInt(TextField_Greade.getText());
                                                                                    if ( (Greade_N > 99) || (Greade_N < 1) )
                                                                                                   JOptionPane.showMessageDialog(cont2," Please\nEnter Number in (Greade) Between 1 To 99", "ERROR NUMBER",JOptionPane.ERROR_MESSAGE);
                                                                                    else
                                                                                              Nu_S_S_D_F_T_F_T_T_A = Countr_Index_Of_ArrayEmp;
                                                                                              Number_Set_Kind_Employee = 1; // = Boss
                                                                                              Set_Save_Data_From_Text_Field_To_The_Arayy();
                                                                                              Set_All_Text_Field_To_Defolt_Text();
                                                                                              JOptionPane.showMessageDialog(cont2,Name_set_Save_Data + "\nwas Created As Boss", "Create",JOptionPane.INFORMATION_MESSAGE);
                                                                                              Countr_Index_Of_ArrayEmp ++;
                                                                                              Number_Stop_Create ++;
                                                                          catch(Exception ex)
                                                                                    JOptionPane.showMessageDialog(cont2,"Please Enter Correct Data\n"+ex, "Exception",JOptionPane.ERROR_MESSAGE);
                                                                // Kind of Employee that will ad is rad_HourlyWorker
                                                                if(rad_HourlyWorker.isSelected() == true)
                                                                               try
                                                                                    int Greade_N = Integer.parseInt(TextField_Greade.getText());
                                                                                    if ( (Greade_N > 99) || (Greade_N < 1) )
                                                                                              JOptionPane.showMessageDialog(cont2," Please\nEnter Number in (Greade) Between 1 To 99", "ERROR NUMBER",JOptionPane.ERROR_MESSAGE);
                                                                                    else
                                                                                              Nu_S_S_D_F_T_F_T_T_A = Countr_Index_Of_ArrayEmp;
                                                                                              Number_Set_Kind_Employee = 2; // = HourlyWorker
                                                                                              Set_Save_Data_From_Text_Field_To_The_Arayy();
                                                                                              Set_All_Text_Field_To_Defolt_Text();
                                                                                              JOptionPane.showMessageDialog(cont2,Name_set_Save_Data + "\nwas Created As HourlyWorker", "Create",JOptionPane.INFORMATION_MESSAGE);
                                                                                              Countr_Index_Of_ArrayEmp ++;
                                                                                              Number_Stop_Create ++;
                                                                          catch(Exception ex)
                                                                                    JOptionPane.showMessageDialog(cont2,ex, "Exception",JOptionPane.ERROR_MESSAGE);
                                                                // Kind of Employee that will ad is rad_PiceWorker
                                                                if(rad_PiceWorker.isSelected() == true)
                                                                          try
                                                                                    int Greade_N = Integer.parseInt(TextField_Greade.getText());
                                                                                    if ( (Greade_N > 99) || (Greade_N < 1) )
                                                                                              JOptionPane.showMessageDialog(cont2," Please\nEnter Number in (Greade) Between 1 To 99", "ERROR NUMBER",JOptionPane.ERROR_MESSAGE);
                                                                                    else
                                                                                              Nu_S_S_D_F_T_F_T_T_A = Countr_Index_Of_ArrayEmp;
                                                                                              Number_Set_Kind_Employee = 3; // = PiceWorker
                                                                                              Set_Save_Data_From_Text_Field_To_The_Arayy();
                                                                                              Set_All_Text_Field_To_Defolt_Text();
                                                                                              JOptionPane.showMessageDialog(cont2,Name_set_Save_Data + "\nwas Created As PiceWorker", "Create",JOptionPane.INFORMATION_MESSAGE);
                                                                                              Countr_Index_Of_ArrayEmp ++;
                                                                                              Number_Stop_Create ++;
        

  • Question about links

    The program I am using is Dreamweaver CS3.
    I have body copy that came to me via email attachment and was created in windows 7. This copy has two areas that need to have links. From this point what do I need to do in order to add the links so that when I insert it onto my Dreamweaver page I will be able to highlight the copy where the links go and add the address in the property inspector? Below is the email I was speaking of and appreciate all of you ideas and help.
    Little House Helps Build Habitat Homes!!
    The cast and crew of Little House on the Prairie - the Musical, including Melissa Gilbert - playing Ma, are heading to Cowtown to put on an amazing production and help Trinity Habitat for Humanity!   
    PHOTO HERE
    Melissa Gilbert working on a Habitat Home.
    Trinity Habitat will be receiving a donation at the end of tour! 
    So show your support - purchase some tickets to the Musical for family and friends, which helps Habitat too!!  The June 8-13 show will be at Bass Hall.
    Click on the link below for tickets, times and event details.
    http://littlehousethemusical.com/tickets/
    The partnership with the Little House production and Habitat for Humanity began in the fall 2009 and will continue as the show travels to the remaining show cities.  To read more about the partnership, click here.

    Go through the XHTML and CSS tutorials at W3Schools to learn the jargon.  XHTML = content.  CSS = styles.
    HTML & CSS Tutorials - http://w3schools.com/
    Once you understand the terminology, you'll better understand what DW does for you.
    Next, work through some on-line tutorials by creating a few test sites.  These will familiarize you with modern web concepts and introduce you to the DW tools & work space.
         Getting Started with DW CS3
         http://www.adobe.com/devnet/dreamweaver/articles/getting_started_dreamweaver_cs3.html
         Creating your first website in CS4 (part 2) -- the same basic principles apply to all versions of DW
         http://www.adobe.com/devnet/dreamweaver/articles/first_cs4_website_pt2.html
         Learn to Work with CSS
         http://www.adobe.com/devnet/dreamweaver/css.html
    In addition to the Adobe Devnet tutorials, you'll find many more on-line tutorials at the following sites.
    Lynda.com - http://www.Lynda.com
    Community MX - http://www.communitymx.com/
    If you get stuck on anything, feel free to post questions in this forum. 
    Have fun!
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb
    http://alt-web.blogspot.com

  • Questions about track listing and album

    I have burnt my collection of an audio drama I have on CD and transferred them to the Creative Vision M. The problem is the tracks play in alphabetical order, not in the numerical order (as in #1, 2, 3, etc.)
    I've gone and used MP3 Tag Editor to check the tracks 3 times. On my Archos, the tracks play according to order by #1(which happens to be the story order). How can I fix this order?
    Also, album isn't displayed despite the fact they've been attached using MP3 Tag Editor. The art is displayed on my Zune and the Archos but not on the Vision M.
    Help :robotsad:

    Eccentric_Hero wrote:
    In fact, now that I think about it... I didn't have to edit anything when I first uploaded them to the Archos.Message Edited by Eccentric_Hero on 04-29-2008 06:27 PM
    It could have something to do with the file system that was used... my old Zen MuVO played whatever I added in the order it was added because the file system was a external flash drive system. The Zune and the Zen both may use a different file system that plays and sort the tracks based on certain tag info. I know that from what I've read on here that the file system that the Zen uses is the main reason why SD card integration is impossible.
    Hope this helps,
    Frank.

  • Question about linking to pdf and doc documents

    When I link to pdf or doc pages in my web page they always down load to the down load folder and then I have to go find them and then double click on them before they open. Is there anyway to get these type documents to open automatically when they are selected in my web page?
    thanks

    Word documents should always download and.  There is no Mac option to just "Open" those files.  With regards to the PDF format that is a little different.
    If you have a Mac with a Core Solo or if you are running Safari in 32-bit mode or Camino then then Acrobat should be set to open the files in a browser.  In the preferences for Acrobat make sure Fast Web View is selected and make sure you have Acrobat set to open up the PDFs.
    If you are have a Core 2 Duo/Core ix Mac then you are by default in 64-bit mode with Safari.  If this is the case unfortunately Adobe has not released a patch to make the PDF reader plugin work in 64-bit mode.  Adobe's "fix" is to run Safari in 32-bit mode which isn't a fix and Acrobat is long overdue for an update.  But that aside, Preview should open up the PDF documents.  If that is not opening up the PDF in the browser I would have to look into it a little more.  Probably a corrupted plugin but I would even know where to replace it off the top of my head.

  • Very simple question about webapp list layout.

    Hi Everyone!
    I am having a very simple issue. I have created a web app and it has a default list layout looks like:
    <table><tbody><tr><td>{tag_counter}. {tag_name}</td></tr></tbody></table>
    I have placed web app module (using {module_webapps,14273,a} ) in one of my page. In front-end it has show every thing fine except it shows table tag for each item:
    <table>
        <tbody>
            <tr>
                <td>1. <a href="/lot/lot-101">Castlepoint Lot 101</a></td>
            </tr>
        </tbody>
    </table>
    <table>
        <tbody>
            <tr>
                <td>2. <a href="/lot/efg-lot">EFG Lot</a></td>
            </tr>
        </tbody>
    </table>
    <table>
        <tbody>
            <tr>
                <td>3. <a href="/lot/some-lot">Some Lot</a></td>
            </tr>
        </tbody>
    </table>
    <table>
        <tbody>
            <tr>
                <td>4. <a href="/lot/some-other-lot">Some Other Lot</a></td>
            </tr>
        </tbody>
    </table>
    When I delete table and tbody tags from list view, it stop showing table related tags instead it start showing it without any tag.
    How to correct this issue? Please help!!!

    Here is what you can do:
    -edit the webapp list layout via FTP or via the "alpha" File Manager. The WYSIWYG editor will attempt to "correct" your HTML code. Enter something like this:
    <tr>
    <td>
    {tag_counter}. {tag_name}
    </td>
    </tr>
    -on the page you need the listing placed on enter this code:
    <table>
    <tbody>
    {webappmodule here}
    </tbody>
    </table>
    When the page renders you will get the desired result:
    <table>
    <tbody>
    <tr><td>1</td><td>Item1</td></tr>
    <tr><td>2</td><td>Item2</td></tr>
    <tr><td>3</td><td>Item3</td></tr>
    <tr><td>4</td><td>Item4</td></tr>
    </tbody>
    </table>

  • Question about "Linked" pictures and how to get rid of them?

    I have recently upgraded from a 2011 MacBook Pro to a 2013 MacBook Pro and there is a picture under Users & Groups when you go to change the display picture under "Linked" that I can't get rid of, while that isn't really an issue even though I would like to get rid of it if possible, every time I change my picture on Messages, when I close the application and come back into it, that linked picture is my display picture again. Any suggestions?

    I have recently upgraded from a 2011 MacBook Pro to a 2013 MacBook Pro and there is a picture under Users & Groups when you go to change the display picture under "Linked" that I can't get rid of, while that isn't really an issue even though I would like to get rid of it if possible, every time I change my picture on Messages, when I close the application and come back into it, that linked picture is my display picture again. Any suggestions?

  • Quick question about a list

    I have a function in a component that has
    <function>
    <query queryOne>
    </query>
    <cfset to listOne>
    <query queryTwo>
    </query>
    <cfloop queryTwo>
    <cfif ListFind(listOne, queryTwo.field)>
    do this stuff
    </cfif>
    </cfloop>
    </function>
    I can see both queries pull the correct info when running
    them in my db program... but its not running my do this stuff...
    should I be able to access the list or do I have to so a
    variable.listOne? If it is right, them maybe I have some other
    logic issue, I just wanted to cross out one possible place I messed
    it up.
    Thanks,
    Va.

    Your sample code is a bit cryptic, but your problem is
    probably the ListFind function. If there is case sensitivity, use
    ListFindNoCase( ).

  • Question about linked tables

    I want to create a table and am using sql8 as back end.
    My front end is Access. I want to create a button in the access form that will update certain values in a table in the database. I dont want to add the database in the access form.
    I am thinking of creating a linked table getting values from the main table and create a linked table from it. Then i was thinking of updating the linked table by adding it up to the access form and using a button for the update query.
    Would it work.
    What wud be the syntax to create a linked table from the main one and wud the updates show on the main table if i update the linked table.
    Is there an alternative to it.
    I do not want to use any triggers though.
    Ashish

    Hi
    update tables are temporary table that are refreshed by v3 job.update table is like buffer, it gets filled after updation of application table and statistical table through v1 v2 update .  we can bypass this process by delta methods.
    M Kalpana

  • A question about synchronized Lists...

    If I have a synchronized list, and I have a synchronized block in one thread with a lock on that list (synchronized(List)) am i supposed to be able to add an item to that list directly (using the List.add() method) from another thread while I'm still in the synchronized block previously described?
    I have some code here where I tried to test that and the answer that I got is that it is possible while (I believe) it's not possible theoretically speaking.
    import java.util.*;
    public class Warehouse implements Runnable{
         List<String> items = Collections.synchronizedList(new ArrayList<String>());
    //     List<String> items = new ArrayList<String>();
         public static void main(String[] args){
              Warehouse w = new Warehouse();
              Manager m = new Manager(w);
              Thread one = new Thread(w);
              Thread two = new Thread(m);
              one.start();
              two.start();
         public void add(String t){
              synchronized(items){               
                   for(int i=0; i<2; ++i){
                        System.out.println("Warehouse added item...");
                        try{
                        Thread.sleep(500);
                        }catch(InterruptedException ie){
                             ie.printStackTrace();
                   items.add(t);
                   items.notify();
         public void run(){
              for(int i=0; i<1; ++i){
                   synchronized(items){
                        while(items.isEmpty()){
                             try{
                             System.out.println("Warehouse waiting...");
                             items.wait();
    //                         System.out.println("Warehouse after waiting...");
                             for(int j=0; j<2; ++j){
                                  System.out.println("Warehouse after waiting...");
                                  try{
                                  Thread.sleep(500);
                                  }catch(InterruptedException ie){
                                       ie.printStackTrace();
                             }catch(InterruptedException ie){
                                  ie.printStackTrace();
    class Manager implements Runnable{
         Warehouse w;
         public Manager(Warehouse w){
              this.w = w;
         public void run(){
              for(int i=0; i<1; ++i){               
                   System.out.println("Manager Adding item...");
                   w.add("articulo");                              
                   for(int j=0; j<5; ++j){
                        w.items.add("jeje");
                        try{
                        Thread.sleep(500);
                        }catch(Exception ex){ex.printStackTrace();}
                        System.out.println("Manager adding to items");
                   System.out.println("Manager finished with warehouse...");
    }Output:
    Warehouse waiting...
    Manager Adding item...
    Warehouse added item...
    Warehouse added item...
    *Warehouse after waiting...*
    *Manager adding to items*
    *Warehouse after waiting...*
    *Manager adding to items*
    Manager adding to items
    Manager adding to items
    Manager adding to items
    Manager finished with warehouse...The code in "bold" (with the tokens) isn't supposed to happen concurrently as I understand it since the "warehouse after waiting" statement it's in the synchronized block with a lock on the items list and the "manager adding to items" statement is adding an item to that list through a direct reference to that list...

    When the manager thread notifies the items (warehouse thread), the warehouse thread does not have to wake up automatically, it has to compete for the items lock then wait for its Thread context to execute. Which means that the manage is able to continue to execute - adding to items manually, and eventually sleep()ing. When the manager thread sleeps that is a good place for a Thread context switch, and if the JVM takes that opportunity to do so, then the warehouse thread regains the lock and would prevent further access to items. But at some point the Thread context will switch again (probably when warehouse thread goes to sleep). Now the manager thread can wake up, print that it is working because that code is not protected by any synchronized lock. Then when it attempts to add to items again it blocks. Another thread context switch allows the warehouse to complete its work, finish up, and release the items lock. Manager can then get the lock on items and finish its work. The results would be exactly as you display them. Here is a possible walk-through of the threading paths taken:
    Thread == Warehouse
    i = 0
      lock on items
        items.isEmpty == true
          print "Warehouse is waiting"
          items.wait (unlock items)
    /* CONTEXT SWITCH */
    Thread == Manager
    i = 0
      print ""Manager Adding item..."
      locking items
        i = 0
          printing "Warehouse added item..."
          sleeping 500
        i = 1
          printing "Warehouse added item..."
          sleeping 500
        i ! < 2
        locking items
          adding to items
        unlocking items
        notifying items (wait will unlock eventually)
      unlocking items
      j = 0
        locking items
          adding to items
        unlocking items
        sleeping 500
    /* CONTEXT SWITCH */
    Thread == Warehouse
          items.wait (regain lock and get context)
          j = 0
            prinitng "Warehouse after waiting..."
            sleeping 500
    /* CONTEXT SWITCH */
    Thread == Manager
        sleeping 500 is done
        printing "Manager adding to items"
      j = 1
        locking items (blocking until items is available)
    /* CONTEXT SWITCH */
    Thread == Warehouse
            sleeping 500 is done
          j = 1
            printing "Warehouse after waiting..."
          j ! < 2
        itemse ! isEmpty
      unlocking items
    i ! < 1
    /* End of Warehouse Thread */
    /* CONTEXT SWITCH */
    Thread == Manager
        locking items (lock available)
          adding to itemes
        unlock items
        sleeping 500
        printing "Manager adding to items"
      j = 2
        locking items
          adding to itemes
        unlock items
        sleeping 500
        printing "Manager adding to items"
      j = 3
        locking items
          adding to itemes
        unlock items
        sleeping 500
        printing "Manager adding to items"
      j = 4
        locking items
          adding to itemes
        unlock items
        sleeping 500
        printing "Manager adding to items"
      j ! < 5
      printing "Manager finished with warehouse..."
    i ! < 1
    /* End of Manager Thread */So the theory an practice are the same - you can not access the items object when it is locked by another thread. The problem is that your test does not demonstrate when locks are held and released - some of the output you expect to be protected is not and so you mis-interpret the code.

  • Question about linking

    So my issue is... All my links work excellent until I get to
    one (linked to this page:
    http://www.eprocessingcenter.com/mmw/main.php3?Page=end_user&Mode=ecommerce&
    Eaccessories=MZAWOTEWRNJPZGF5MTA5NDG1MJG1MA). Once the button
    for this is selected it goes to the page fine... But then none of
    the other buttons work, just stays on this page no matter what. I
    noticed if I switch the link to a file ending in an extension or a
    website that ends in anything but a letter it works perfect. I
    resorted to having it open in a new window. Why is it doing that?
    It's making me crazy!!!
    www.fivestarcell.com

    Can you explain this a little differently - I don't quite
    understand what the problem is?

  • Question about distribution lists

    I've create some distribution lists and added users to them.
    When I send a message directly to the user I can see it in the rcpt user mailbox.
    If I send a message to the distribution list to which the user subscribes, the unser doesn't receive the message in the mailbox
    I've to set something to see this messages?

    First verify that the user sending the email has permission to post to the list. Depending on how the list is set up, you may need to be a subscriber to send to the list, otherwise the message may be rejected.
    The next thing to check is the the mail queue to see if the message is stuck there. I do this by connecting to the es_mail database (using sqlplus) and running a query like this:
    select * from es_queue where queue = 5That will indicate if any messages are in the list queue (which is queue 5). If so, then it is possible that your list queue process is down. You can use the EM console to check the status of your list processes, or just run the oesctl command, eg:
    oesctl show targetsThis will return the list of mail processors configured on the local server. To get the status, just pick the list name and run:
    oesctl show status server-name:um_system:listThis should return something like:
    server-name:um_system:list:110291835244465386 ----Heartbeat-----

  • Linked lists problem -- help needed

    Hello again. I've got yet another problem in my C++ course that stems from my use of a Mac instead of Windows. I'm going to install Parallels so I can get Windows on my MacBook and install Visual Studio this week so that I don't have to deal with these discrepancies anymore, but in the meanwhile, I'm having a problem here that I don't know how to resolve. To be clear, I've spent a lot of time trying to work this out myself, so I'm not just throwing this up here to have you guys do the work for me -- I'm really stuck here, and am coming here as a last resort, so I'll be very, very appreciative for any help that anyone can offer.
    In my C++ course, we are on a chapter about linked lists, and the professor has given us a template to make the linked lists work. It comes in three files (a header, a source file, and a main source file). I've made some adjustments -- the original files the professor provided brought up 36 errors and a handful of warnings, but I altered the #include directives and got it down to 2 errors. The problematic part of the code (the part that contains the two errors) is in one of the function definitions, print_list(), in the source file. That function definition is shown below, and I've marked the two statements that have the errors using comments that say exactly what the errors say in my Xcode window under those two statements. If you want to see the entire template, I've pasted the full code from all three files at the bottom of this post, but for now, here is the function definition (in the source file) that contains the part of the code with the errors:
    void LinkedList::printlist( )
    // good for only a few nodes in a list
    if(isEmpty() == 1)
    cout << "No nodes to display" << endl;
    return;
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->name; } cout << endl; // error: 'setw' was not declared in this scope
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->test_grade; } cout << endl; // error: 'setw' was not declared in this scope
    As you can see, the problem is with the two statements that contain the 'setw' function. Can anyone help me figure out how to get this template working and get by these two errors? I don't know enough about linked lists to know what I can and can't mess with here to get it working. The professor recommended that I try using 'printf' instead of 'cout' for those two statements, but I don't know how to achieve the same effect (how to do whatever 'setw' does) using 'printf'. Can anyone please help me get this template working? Thank you very, very much.
    For reference, here is the full code from all three files that make up the template:
    linkedlist.h (header file):
    #ifndef LINKED_LINKED_H
    #define LINKED_LINKED_H
    struct NODE
    string name;
    int test_grade;
    NODE * link;
    class Linked_List
    public:
    Linked_List();
    void insert(string n, int score);
    void remove(string target);
    void print_list();
    private:
    bool isEmpty();
    NODE *FRONT_ptr, *REAR_ptr, *CURSOR, *INSERT, *PREVIOUS_ptr;
    #endif
    linkedlist.cpp (source file):
    #include <iostream>
    using namespace std;
    #include "linkedlist.h"
    LinkedList::LinkedList()
    FRONT_ptr = NULL;
    REAR_ptr = NULL;
    PREVIOUS_ptr = NULL;
    CURSOR = NULL;
    void Linked_List::insert(string n, int score)
    INSERT = new NODE;
    if(isEmpty()) // first item in List
    // collect information into INSERT NODE
    INSERT-> name = n;
    // must use strcpy to assign strings
    INSERT -> test_grade = score;
    INSERT -> link = NULL;
    FRONT_ptr = INSERT;
    REAR_ptr = INSERT;
    else // else what?? When would this happen??
    // collect information into INSERT NODE
    INSERT-> name = n; // must use strcpy to assign strings
    INSERT -> test_grade = score;
    REAR_ptr -> link = INSERT;
    INSERT -> link = NULL;
    REAR_ptr = INSERT;
    void LinkedList::printlist( )
    // good for only a few nodes in a list
    if(isEmpty() == 1)
    cout << "No nodes to display" << endl;
    return;
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->name; } cout << endl; // error: 'setw' was not declared in this scope
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    { cout << setw(8) << CURSOR->test_grade; } cout << endl; // error: 'setw' was not declared in this scope
    void Linked_List::remove(string target)
    // 3 possible places that NODES can be removed from in the Linked List
    // FRONT
    // MIDDLE
    // REAR
    // all 3 condition need to be covered and coded
    // use Trasversing to find TARGET
    PREVIOUS_ptr = NULL;
    for(CURSOR = FRONT_ptr; CURSOR; CURSOR = CURSOR-> link)
    if(CURSOR->name == target) // match
    { break; } // function will still continue, CURSOR will
    // mark NODE to be removed
    else
    { PREVIOUS_ptr = CURSOR; } // PREVIOUS marks what NODE CURSOR is marking
    // JUST before CURSOR is about to move to the next NODE
    if(CURSOR == NULL) // never found a match
    { return; }
    else
    // check each condition FRONT, REAR and MIDDLE
    if(CURSOR == FRONT_ptr)
    // TARGET node was the first in the list
    FRONT_ptr = FRONT_ptr -> link; // moves FRONT_ptr up one node
    delete CURSOR; // deletes and return NODE back to free memory!!!
    return;
    }// why no need for PREVIOUS??
    else if (CURSOR == REAR_ptr) // TARGET node was the last in the list
    { // will need PREVIOUS for this one
    PREVIOUS_ptr -> link = NULL; // since this node will become the last in the list
    REAR_ptr = PREVIOUS_ptr; // = REAR_ptr; // moves REAR_ptr into correct position in list
    delete CURSOR; // deletes and return NODE back to free memory!!!
    return;
    else // TARGET node was the middle of the list
    { // will need PREVIOUS also for this one
    PREVIOUS_ptr -> link = CURSOR-> link; // moves PREV nodes' link to point where CURSOR nodes' points
    delete CURSOR; // deletes and return NODE back to free memory!!!
    return;
    bool Linked_List::isEmpty()
    if ((FRONT_ptr == NULL) && (REAR_ptr == NULL))
    { return true; }
    else
    { return false;}
    llmain.cpp (main source file):
    #include <iostream>
    #include <string>
    #include <iomanip>
    using namespace std;
    #include "linkedlist.h"
    int main()
    Linked_List one;
    one.insert("Angela", 261);
    one.insert("Jack", 20);
    one.insert("Peter", 120);
    one.insert("Chris", 270);
    one.print_list();
    one.remove("Jack");
    one.print_list();
    one.remove("Angela");
    one.print_list();
    one.remove("Chris");
    one.print_list();
    return 0;

    setw is the equivalent of the field width value in printf. In your code, the printf version would look like:
    printf("%8s", CURSOR->name.c_str());
    I much prefer printf over any I/O formatting in C++. See the printf man page for more information. I recommend using Bwana: http://www.bruji.com/bwana/
    I do think it is a good idea to verify your code on the platform it will be tested against. That means Visual Studio. However, you don't want to use Visual Studio. As you have found out, it gets people into too many bad habits. Linux is much the same way. Both development platforms are designed to build anything, whether or not it is syntactically correct. Both GNU and Microsoft have a long history of changing the language standards just to suit themselves.
    I don't know what level you are in the class, but I have a few tips for you. I'll phrase them so that they answers are a good exercise for the student
    * Look into const-correctness.
    * You don't need to compare a bool to 1. You can just use bool. Plus, any integer or pointer type has an implicit cast to bool.
    * Don't reuse your CURSOR pointer as a temporary index. Create a new pointer inside the for loop.
    * In C++, a struct is the same thing as a class, with all of its members public by default. You can create constructors and member functions in a struct.
    * Optimize your function arguments. Pass by const reference instead of by copy. You will need to use pass by copy at a later date, but don't worry about that now.
    * Look into initializer lists.
    * In C++ NULL and 0 are always the same.
    * Return the result of an expression instead of true or false. Technically this isn't officially Return Value Optimization, but it is a good habit.
    Of course, get it running first, then make it fancy.

  • I have a question about japan new depriciation engine using non-japanese chart of deprication

    Hi, all
    I have a question about link between new depriciation engine and chart of depriciation.
    My client want to use US chart of depriciation as standard chart of depriciation becuase it has already standard setting like IAS deprication keys.
    it means I have to create Japanese chart of depriciation by copying from US chart of depriciation(non-japanese sample(0JP))
    I have a little doubt about it. In my previous project, I copyed chart of depriciation by copy from Japan sample Chart of depriciation(0JP) stored in SAP.
    Is it possible to copy from non-japan sample charg of depriciation to using Japanese new depriciation engine? I worried some errors will occrues if I do not use sample chart of depriciation(0JP) .
    If I need to use sample Japanese chart of depriciation, please give me the idea why I need to use Japanese sample chart of depriciation. I want to know the examples of non-Japanese asset accouting consultants who have working experience in the area.
    Thank you.

    Hi, Narasimhulu
    Thank you for your support.
    My client use one COA to all over the world. And not only Japan, other country aslo use the COD which is copied from that of US. Basic reporting line is for USGAP. I will customize 2 depriciation ares, one for US GAP and another is JGAP. No need to create TAX realted customize.  It means it enought only adding Japanese new depriciation keys to Current US COD. No need to add more Japanese local requirements.
    In this case, I want to know follwoing point.
    I know COD controll depriciation keys, but I want to know more detail about COD, what kinds of controls COD do. What is Japanese local requirements. Why better to use COPY of JP COD.
    Thank you.

Maybe you are looking for

  • Accounting substitution during MIRO

    Hello Experts, I need to define substitution during MIRO Process is : When material is received from foreign vendor, exchange rate used is as on the date of mat receipt. But the requirement is to valuate the inventory with exchange rate prevailing on

  • Purchase requisition release - reg.,

    Hi guru"s When Iam releasing purchase requisition one item is not getting into release? can anybody explain what is the problem thanks in advance tulja singh

  • Tax Processing

    Hi, The query is on tax calculation. I have 2 billing documents. 1. Both is for same customer and payer. 2. Both for same material. 3. The only diff among these two is the delivering plant. The delivering plant for the 1st one is in country CA(canada

  • [CS3][JS] Return first page for story

    I'm bogged down trying to find a simple way to return the number of the first page that a particular story appears on, assuming that it is placed on a page and not all overset. Or the number of the page that the first word in the story appears on, or

  • How can I increase resolution when burning a dvd with elements 11 premiere

    How can I increase resolution when burning a dvd with elements 11 premiere I am trying to generate a slide show DVD....the pictures on the TV are poor quality