Compiling Error Method body missing

Ok so i have a program that reads in 6 grades for 10 different students takes the avg and prints outs the Name 6 scores avg and the letter grade they would recieve in a nice chart using printf in my main method i get the error MIssing method body or declare abstract. Any help as to why i am getting this would be much appreciated.
import java.util.*;
import java.io.*;
public class Finals
    static Scanner input = new Scanner(System.in);
    public static void main(String[] args)throws IOException;
        Scanner inFile = new Scanner(FileReader("Grades.txt"));
        double [] [] scores = new double [10] [6];
        String [] name = new String [10];
        double [] grade = new double [6];
        char [] lettergrade = new char [10];
        int row = 0;
        int collum = 0;
        int collum2 = 0;
        int index = 0;
        while(inFile.hasNext())
            name[index] = input.Next();
            while(collum < 9)
                scores[row][collum] = input.nextDouble();
                collum = collum + 1;
            collum = 0;
            row = row + 1;
        inFile.Close();
        calculation(score, name, grade);
        print(score, grade, name, lettergrade);
    public static int calculation(double [] [] score, String [] name, double [] grade)
        int index = 0;
        int row = 0;
        int collum = 0;
        int j = 0;
        int m = 0;
        int k = 0;
        //add all the grades in the first row store that into a new array called average than run through a loop to find out what letter grade it equals store letter grade in a char array
        while(collum < 10)
            grade[j] = grade[j] + score[collum][row];
            row ++;
            if(row == 6)
                collum ++;
                row = 0;
                j ++;
        return grade;
    public static void print(double [] [] score, String [] name, double [] grade, char [] lettergrade)
        int index = 0;
        int j = 0;
        while(index < 10)
            if(score[j] >= 92.5)
                lettergrade[j] = 'A';
                j ++;
                index ++;
            else if(score[j] >= 82.5 && score[j] < 92.5)
                lettergrade[j] = 'B';
                j ++;
                index ++;
            else if(score[j] >= 72.5 && score[j] < 82.5)
                lettergrade[j] = 'C';
                j ++;
                index ++;
            else if(score[j] >= 62.5 && score[j] < 72.5)
                lettergrade[j] = 'D';
                j ++;
                index ++;
            else
                lettergrade[j] = 'F';
                j ++;
                index ++;
        System.out.println("Student    Test1   Test2   Test3   Test4   Test5   Average   Grade");
        System.out.printf("11%s40%d8%d5%c", name, score, grade, lettergrade);
}

public static void main(String[] args)throws IOException;Remove that semicolon.

Similar Messages

  • Compile Error Windows is missing

    After compiling a Package Body that is invalid, i can't see the error-window.
    The View-Log Window Menu has no effect.
    What's wrong ?
    Anhancement: More than one filter
    Regards
    Uwe

    Good to see that there is indeed an openbug/request
    on this problem. Has been giving me hell for awhile
    as well. I created a custom report as "Select *from
    user_errors" which is the first thing I run if oneof
    my procedures/packages is having troubles.
    SQL Developer's got minimal support for file-based
    development at the moment. :(Not for Long!Yeah!! Makes me exceptionally happy. I vastly prefer file-based development. Much easier for me personally.

  • MyInteger class- compile error - method doesnt implement comparable method

    I am trying to test how the code for a hash table works- I have 4 classes
    Hashable interface
    QuadraticProbableHashTable
    HashEntry
    MyInteger
    Everything is compiling but one error comes up saying that "Class must implement the inherited abstract method Comparable.compareTo(object)."
    I have a comparable method with the same signature as that in Comparable interface; in MyInteger.java where the problem is. However I still have the same problem.
         * Wrapper class for use with generic data structures.
         * Mimics Integer.
        public final class MyInteger implements Comparable, Hashable
             * Construct the MyInteger object with initial value 0.
            public MyInteger( )
                this( 0 );
             * Construct the MyInteger object.
             * @param x the initial value.
            public MyInteger( int x )
                value = x;
             * Gets the stored int value.
             * @return the stored value.
            public int intValue( )
                return value;
             * Implements the toString method.
             * @return the String representation.
            public String toString( )
                return Integer.toString( value );
             * Implements the compareTo method.
             * @param rhs the other MyInteger object.
             * @return 0 if two objects are equal;
             *     less than zero if this object is smaller;
             *     greater than zero if this object is larger.
             * @exception ClassCastException if rhs is not
             *     a MyInteger.
            public int compareTo( Comparable rhs )
                return value < ((MyInteger)rhs).value ? -1 :
                       value == ((MyInteger)rhs).value ? 0 : 1;
             * Implements the equals method.
             * @param rhs the second MyInteger.
             * @return true if the objects are equal, false otherwise.
             * @exception ClassCastException if rhs is not
             *     a MyInteger.
            public boolean equals( Object rhs )
                return rhs != null && value == ((MyInteger)rhs).value;
             * Implements the hash method.
             * @param tableSize the hash table size.
             * @return a number between 0 and tableSize-1.
            public int hash( int tableSize )
                if( value < 0 )
                    return -value % tableSize;
                else
                    return value % tableSize;
            private int value;
        }

    >
    You might want to also allow for cases where the
    value passed in is null, or the argument to the
    method is NOT a MyInteger object :-)
    Just a small note - the javadocs for Comparable#compareTo says the following:
    Throws:
    ClassCastException - if the specified object's type prevents it from being compared to this Object.
    So it's perfectly OK to blindly try to cast to the desired type in the sense that you are not violating the Comparable contract if the cast fails.

  • Help with compilation error

    Hello
    I have a problem with my jsp developement. When i create a jsp (with no beans) i test it and it runs fine (not good but fine), then when I test it with multiple users at time, it generate a jsp compilation error ie. "missing term }" and I can not figure out why it is getting that error, it has been compilated before! so it should not generate a compilation error, becouse i'm not editing the jsp source. I think that every time the jsp is requested the virtual machine is re-compiling it, but is only what i thing and i don't know why... can any body help me? please.
    I apologize for my bad english
    Thank you for your time reading this.

    Sorry becouse i can't be more espesific with the error that i get, that error is complete apears in a complete randomic way, I mean taht it apears when nerver is expected or doesn't apear when is expected, only thing that i got of that error is that the compiler some time says that are mising semi-colon (;), some time says that are mising quotation marks (") or are mising }, the error is no the same allways no mater the situation, I can run the jsp in my pc but the error doesn't apear, thats very strange becouse the compilation error apear after the jsp was executed with no errors.
    this is my jsp:
    <%@ page import="java.util.Calendar,java.text.SimpleDateFormat,java.util.Date,java.util.Stack,java.util.Enumeration, java.util.Hashtable,java.sql.*, java.util.Vector" %>
    <%@ include file="../incs/dbpool_inc.jsp" %>
    <%@ include file="funciones.jsp"%><html>
    <head>
    <title>Resolver preguntas</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="../css/0001.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <% //to get user data from the session.
         String userid = session.getAttribute("idu") != null ? (String)session.getAttribute("idu") : "";
         String asign = session.getAttribute("idHomeAssignatura") != null ? (String)session.getAttribute("idHomeAssignatura"): "";
         String idcuest = session.getAttribute("idcuest") != null ? (String)session.getAttribute("idcuest") : "";
         String secuenc = session.getAttribute("secuenc") != null ? (String)session.getAttribute("secuenc") : "";     
         String secuens = request.getParameter("secuens") != null ? request.getParameter("secuens") : "0";
         //to know if it's aloww to save cahnges in the database
         boolean guardar = request.getParameter("guardar") != null ? (request.getParameter("guardar")).equals("si")? true: false :false;
         if(userid.equals("")|| asign.equals("")){//if 1          
              out.println("</head><body><font face=\"Arial\" size=\"2\" color=\"#000000\"><b>El tiempo de conexi&oacute;n ha expirado. Para ingresar de nuevo al sistema haga click aqu&iacute;.</b></font></body></html>");
         }//fin if 1
         else{//else de if 1          
              try{// try 1
                   Connection conn = dbpool.getConnection();
                   Statement stmtt = conn.createStatement();
                   Statement stmtmod = conn.createStatement();
                   Statement stmtresp = conn.createStatement();
                   ResultSet rsmodul = stmtmod.executeQuery("select id_modulo from eit_cuestxmat where id_cuestionario="+idcuest);
                   String modulo = rsmodul.next()? rsmodul.getString("id_modulo"): "";
                   rsmodul.close();
                   stmtmod.close();
                   int secuencia1 = Integer.parseInt(secuens);
                   int secuencia2 = Integer.parseInt(secuenc)+1;
                   secuenc = (secuencia1 == secuencia2)? String.valueOf((Integer.parseInt(secuenc)+1)): secuenc;
                   session.setAttribute("secuenc", secuenc);               
                   if(esAlumno(userid, stmtt, asign)){//if 2
                   if(guardar){//if 2.0
                             String idpreg1 = request.getParameter("idpregunta") != null ? request.getParameter("idpregunta") : "";
                             ResultSet rstipop = stmtt.executeQuery("select tipo from eit_pregunta where id_pregunta="+idpreg1);                         
                             String tipop1 = rstipop.next()? rstipop.getString("tipo") : "";
                             rstipop.close();
                             String respuesta = "N/A", correspondencia ="";                         
                             String restado="n";
                             String rcorrecta = "n";
                             if(tipop1.equals("selec")){
                                  correspondencia = request.getParameter("rprevia") != null? request.getParameter("rprevia") : "-1";
                                  ResultSet rscorrecta = stmtt.executeQuery("select escorrecta from eit_opciones where id_pregunta="+
                                                           idpreg1+" and id_opcion="+correspondencia+" and escorrecta like 's'");
                                  if(rscorrecta.next()){
                                       rcorrecta = "s";
                                  rscorrecta.close();
                             else{
                                  if(tipop1.equals("empar")){
                                       ResultSet rsempar = stmtt.executeQuery("select escorrecta from eit_opciones where id_pregunta="+
                                                                idpreg1+ "order by orden");
                                       int corres = 0;
                                       int correctas = 0;
                                       while(rsempar.next()){                                   
                                                 String resp = request.getParameter("selopc"+String.valueOf(corres+1)) != null? request.getParameter("selopc"+String.valueOf(corres+1)) : "";
                                                 correspondencia=correspondencia+((corres == 0)? "":",")+resp;
                                                 correctas = correctas + (resp.equals(rsempar.getString("escorrecta"))? 1 : 0);
                                                 corres++;
                                       rcorrecta = String.valueOf(correctas);
                                       rsempar.close();
                                  else{
                                       if(tipop1.equals("complet")){
                                            ResultSet rscomplet= stmtt.executeQuery("select correspondencia from eit_opciones where id_pregunta="+idpreg1);
                                            String complet = rscomplet.next()? rscomplet.getString("correspondencia"):"";
                                            rscomplet.close();
                                            String complet1 = "";
                                            int idxcar = complet.indexOf("$");
                                            respuesta = request.getParameter("comp0") != null ? request.getParameter("comp0") : "";
                                            correspondencia = request.getParameter("comp1") != null ? request.getParameter("comp1") : "";
                                            int corrc =0;
                                            if(idxcar>=0){
                                                 complet1 = complet.substring((idxcar+1),complet.length());
                                                 complet = complet.substring(0, idxcar);
                                                 corrc = (respuesta.equalsIgnoreCase(complet))? 1 : 0;
                                                 corrc = (correspondencia.equalsIgnoreCase(complet1))? (corrc+1) : corrc;
                                                 rcorrecta = (corrc==2)? "s": (corrc==1)? "m": "n";
                                            }else{
                                                 corrc=(respuesta.equalsIgnoreCase(complet))? 1 : 0;
                                                 rcorrecta = (corrc==1)? "s": "n";
                                       else{
                                            if(tipop1.equals("abierta")){
                                                 respuesta = request.getParameter("respuesta") != null? request.getParameter("respuesta") : "";
                             String guardarResp = "insert into eit_respuesta(id_pregunta, id_cuestionario, id_materia, id_modulo"+
                                                      ", respuesta, correspondencia, rcorrecta, restado, sec_pregunta, codest)"+
                                                      " values ("+idpreg1+", "+idcuest+", '"+asign+"', "+modulo+", '"+respuesta+"', '"+correspondencia+"', '"+rcorrecta+"', '"+restado+"', "+
                                                      String.valueOf((Integer.parseInt(secuenc)-1))+", "+userid+")";
                             String sqlexistencia = "select id_pregunta from eit_respuesta where codest ="+userid+" and id_cuestionario="+idcuest+" and id_materia="+
                                                           asign+" and id_modulo="+modulo+" and id_pregunta="+idpreg1;                         
                             boolean existeResp = (stmtt.executeQuery(sqlexistencia)).next();
                             String editarResp = "update eit_respuesta set respuesta='"+respuesta+"', correspondencia='"+correspondencia+"', "+
                                                      "rcorrecta='"+rcorrecta+"', restado='"+restado+
                                                      "' where codest ="+userid+" and id_cuestionario="+idcuest+" and id_materia like '"+
                                                      asign+"' and id_modulo="+modulo+" and id_pregunta="+idpreg1;
                             //if the page is editing execute string editarResp else execute string guardarResp
                             stmtt.executeUpdate(existeResp? editarResp:guardarResp);
                        String sqlbpu="select p.enunciado, p.tipo, p.titulo, p.id_pregunta from eit_pregunta p, eit_prexcuest pxc where pxc.id_cuestionario="+idcuest+" and pxc.id_pregunta = p.id_pregunta and pxc.secuenc= "+String.valueOf(secuenc);//bupu: buscar pregunta cuestionario
                        //System.out.println("resolvpreg.jsp "+sqlbpu);
                        ResultSet rsbpu = stmtt.executeQuery(sqlbpu);
                        if(rsbpu.next()){ // if 2.1
                             String enunciado = rsbpu.getString("enunciado");
                             String tipo = rsbpu.getString("tipo");
                             String titulo = rsbpu.getString("titulo");
                             String idpreg = rsbpu.getString("id_pregunta");
    %>
    <h1 align="center"><font color="#0033CC" face="Arial, Helvetica, sans-serif"><%=titulo%></font></h1><br>
    <p align="left"><font face="Arial, Helvetica, sans-serif">
    <strong>Enunciado:</strong> <%=enunciado%>. </font><br>
    <%
         String sqlrespuesta = "select respuesta, correspondencia from eit_respuesta where id_pregunta="+idpreg+
    " and id_cuestionario = "+idcuest+" and id_materia like '"+asign+"' and id_modulo="+modulo+" and codest= "+userid;     
         ResultSet rsrespuesta = stmtresp.executeQuery(sqlrespuesta);     
         String sqlopcs= "select opcion, escorrecta, correspondencia, orden from eit_opciones where id_pregunta ="+idpreg+"order by orden";
         ResultSet rsops = stmtt.executeQuery(sqlopcs);          
    %>
    <%String letras = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
         Vector opciones = new Vector();
         Object obj[] = new Object[4];
         while(rsops.next()){
              obj[0] = rsops.getString("opcion");
              obj[1] = "";
              obj[2] = rsops.getString("correspondencia");
              obj[3] = rsops.getString("orden");
              opciones.addElement(obj.clone());
         rsops.close();
    %>
    <form action="resolverpreg.jsp" method="post" name="Correspondencias">
    <%
         String respEmpar = "";
         String respuestap="";
         String respcorres[] = {"",""};
         if(rsrespuesta.next()){     
              respuestap = rsrespuesta.getString("respuesta");
              respEmpar = rsrespuesta.getString("correspondencia");
              respcorres[0]= respuestap;
              respcorres[1]= respEmpar;
         rsrespuesta.close();
         if (tipo.equals("empar")){
    %>
    <%@ include file="resolvempar.jsp"%>
    <%}//fin if tipoPreg = 'emapar'
         else{
         if(tipo.equals("selec")){
    %> <%@ include file="reslovselec.jsp"%>
         <%}//fin if tipopreg = 'select'
         else{
              if(tipo.equals("complet")){%>
              <%@include file="resolvcomplet.jsp"%>
         <%}//fin if tipopreg='complet'
         else{
              if(tipo.equals("abierta")){%>
              <%@include file="resolvabierta.html"%>
              <%}//fin if tipopreg='abierta'
              else{%>
                   <span class="titolForum">Error: no se ingres&oacute; ning&uacute;n tipo de pregunta
                   o se est� accediendo en forma err&oacute;nea a este sitio.</span>
              <%}//fin else de tipopregunta = 'abierta'%>          
         <%}//fin else tipopreg='complet'%>                    
         <%}// fin else de tipopreg = 'select'%>     
    <%}//fin else de tipoPreg = 'emapar'%>
    <br>
    <input name="idpregunta" type="hidden" value="<%=idpreg%>">
    <input name="guardar" type="hidden" value="si">
    <input name="secuens" type="hidden" value="<%=(1+(Integer.parseInt(secuenc)))%>">
    <input type="submit" name="continuar" value="Continuar">
    </form>
    <%                    rsbpu.close();
                        }//fin 2.1                    
                        else{%>
    Ha terminado de realizar la prueba<br>
    <a href="elejCuestion.jsp">Continuar</a>
    <%}
                   }// fin if 2
                   stmtt.close();
                   stmtresp.close();
                   conn.close();
              }// fin try 1
              catch(Exception expt){
                   out.println("Error: "+expt);
         }//fin eles de if 1
    %>
    </body>
    </html>

  • Error message  "missing method body, or declare abstract"

    This is my test driver. Does anyone know why it is not working?
    public class TestInfo
       public static void main(String args[])
              Info results = new Info();
              printInfo();
         public static String printInfo();
              System.out.println(" The Diameter is: " + results.diam
              + " The Circumference is: " + results.circum
              + " The Area is: " + results.area);
    }The error message I get is: missing method body, or declare abstract
    The print block has to be a separate method. The print block works when I put it in main. When it is in a separate method and I call it in main it doesn't work

    You have an extraneous semi-colon after printInfo. This tells the compiler that that's all there is for that method, which only makes sense if it's an abstract method. It sees the block after the semicolon, but it thinks it's an initializer. So it wants you to either declare it abstract, or give it a method body.
    Just remove that semicolon and you're fine.

  • Missing method body or declare abstract error

    Hi!
    I have been working on this simple Java 1.3.1 program for three days now and cannot figure out what I am doing wrong. If anyone has done the "Building an Application" tutorial in the New to Java Programming Center, you might recognize the code. I am trying to set up a frame with panels first using the BorderLayout and then the FlowLayout within each section of the BorderLayout. It will have textfields and checkboxes. I am working on the code to retrieve the user input from the text boxes and also to determine which checkbox the user has checked. Here is my code: (ignore my irrelivent comments!)
    import java.awt.*;
    import javax.swing.*;
    import java.io.*;
    import java.awt.event.*;
    import java.awt.Color.*;
    import java.awt.Image.*;
    //Header Comment for a Routine/Method
    //This method gathers the input text supplied by the user from five text fields on the Current
    //Purchase tab of the tabbed pane of the MPGLog.java program. The way it gathers the text
    //depends on the current processing state, which it retrieves on its own. It saves the text to
    //a text file called textinput.txt.
    public class CollectTextInput extends JPanel implements ActionListener
    { // Begin class
         //Declare all the objects needed first.
         // These are the text fields
         private JTextField currentMileage;
         private JTextField numofGallonsBought;
         private JTextField dateofPurchase;
         private JTextField pricePerGallon;
         private JTextField gasBrand;
         // Declaring the Labels to go with each TextField
         private JLabel lblcurrentMileage;
         private JLabel lblnumofGallonsBought;
         private JLabel lbldateofPurchase;
         private JLabel lblpricePerGallon;
         private JLabel lblgasBrand;
         // Declaring the Checkboxes for the types of gas bought
         private JCheckBox chbxReg;
         private JCheckBox chbxSuper;
         private JCheckBox chbxUltra;
         private JCheckBox chbxOther;
         private JCheckBox chbxHigher;
         private JCheckBox chbxLower;
         // Declaring the Buttons and images needed
         private JButton enter;
         private JButton edit;
         //private JButton report; //Will be used later
         private JLabel bluecar;          //Used with the ImageIcon to create CRV image
         private JPanel carimage;     //Used in buildImagePanel method
         private JPanel datum;          //Used in buildDatumPanel method
         private JPanel gasgrade;     //Used in buildGasTypePanel method.
         //Declaring the Panels that need to be built and added
         //to the border layout of this panel.
         //private JPanel panlimages;
         //private JPanel panltextinputs;
         //private JPanel panlchkBoxes;
         // Class to handle functionality of checkboxes
         ItemListener handler = new CheckBoxHandler();
         // This is where you add the constructor for the class - I THINK!!
         public CollectTextInput()
         { // Opens collectTextInput constructor
              // Must set layout for collectTextInput here
              // Choosing a BorderLayout because we simply want to
              // add panels to the North, Center and South borders, which, by
              // default, will fill the layout with the three panels
              // we are creating
              setLayout(new BorderLayout());
              //Initialize the objects in the constructor of the class.
              //Initialize the textfields
              currentMileage = new JTextField();
              numofGallonsBought = new JTextField();
              dateofPurchase = new JTextField();
              pricePerGallon = new JTextField();
              gasBrand = new JTextField();
              // Initialize the labels that go with each TextField
              lblcurrentMileage = new JLabel("Enter the mileage at the time of gas purchase: ");
              lblnumofGallonsBought = new JLabel("Enter the number of gallons of gas bought: ");
              lbldateofPurchase = new JLabel("Enter the date of the purchase: ");
              lblpricePerGallon = new JLabel("Enter the price per gallon you paid for the gas: ");
              lblgasBrand = new JLabel("Enter the brand name of the gas: ");
              //Initialize the labels for the checkboxes.
              chbxReg = new JCheckBox("Regular ", true);
              chbxSuper = new JCheckBox("Super ");
              chbxUltra = new JCheckBox("Ultra ");
              chbxOther = new JCheckBox("Other: (Choose one from below) ");
              chbxHigher = new JCheckBox("Higher than Ultra ");
              chbxLower = new JCheckBox("Lower than Ultra ");
              //Initialize the buttons that go on the panel.
              enter = new JButton("Save Data");
              edit = new JButton("Edit Data");
              //Initialize the image that oges on the panel.
              bluecar = new JLabel("2002 Honda CR-V", new ImageIcon("CRVBlue.jpg"),JLabel.CENTER);
              // Now bring it all together by calling the other methods
              // that build the other panels and menu.
              buildImagePanel();
              buildDatumPanel();
              buildGasTypePanel();
              // Once the methods above build the panels, this call to add
              //  them will add the panels to the main panel's border
              // layout manager.
              add(datum, BorderLayout.NORTH);
              add(carimage, BorderLayout.EAST);
              add(gasgrade, BorderLayout.CENTER);
         } // Ends the constructor.
            // This method creates a panel called images that holds the car image.
         public void buildImagePanel();
         { // Opens buildImagePanel.
              // First, create the Panel
              carimage = new JPanel();
              //Second, set the color and layout.
              carimage.setBackground(Color.white);
              carimage.setLayout(new FlowLayout());
              // Third, add the image to the panel.
              carimage.add(bluecar);
         }// Closes buildImagePanel
         //This method creates a panel called datum that holds the text input.
         public void buildDatumPanel();
         { //Opens buildDatumPanel
              // First, create the Panel.
              datum = new JPanel();
              //Second, set the background color and layout.
              datum.setBackground(Color.white);
              datum.setLayout(new GridLayout(2, 4, 20, 20));
              //Third, add the textfields and text labels to the panel.
              datum.add(lblcurrentMileage);
              datum.add(currentMileage);
              datum.add(lblnumofGallonsBought);
              datum.add(numofGallonsBought);
              datum.add(lbldateofPurchase);
              datum.add(dateofPurchase);
              datum.add(lblpricePerGallon);
              datum.add(pricePerGallon);
              datum.add(lblgasBrand);
              datum.add(gasBrand);
              //Optionally - Fourth -set a border around the panel, including
              // a title.
              datum.setBorder(BorderFactory.createTitledBorder("Per Purchase Information"));
              //Fifth - Add listeners to each text field to be able to
              //  know when data is input into them.
              currentMileage.addActionListener(this);
              numofGallonsBought.addActionListener(this);
              dateofPurchase.addActionListener(this);
              pricePerGallon.addActionListener(this);
              gasBrand.addActionListener(this);
         }// Closes buildDatumPanel
         // This method builds a panel called gasTypePanel that holds the checkboxes.
         public void buildGasTypePanel()
         { // Opens buildGasTypePanel method
              // First, create the panel.
              gasgrade = new JPanel();
              // Second, set its background color and its layout.
              gasgrade.setBackground(Color.white);
              gasgrade.setLayout(new GridLayout(5, 1, 10, 20));
              // Third, add all the checkboxes to the panel.
              gasgrade.add(chbxReg);
              gasgrade.add(chbxSuper);
              gasgrade.add(chbxUltra);
              gasgrade.add(chbxOther);
              gasgrade.add(chbxHigher);
              gasgrade.add(chbxLower);
              //Optionally, - Fourth - set a border around the panel, including
              // a title.
              gasgrade.setBorder(BorderFactory.createTitledBorder("Gas Type Information"));
              // Fifth - CheckBoxes require a CheckBox Handler.
              // This is a method created separately
              // outside of the method where the checkboxes are added to
              // the panel or where the checkboxes are even created.
              // This method (CheckBox Handler) implements and ItemListener
              // and is a self-contained method all on its own. See
              // the CheckBox Handler methods following the
              // actionPerformed method which follows.-SLM
         } // Closes the buildGasTypePanel method
    // Create the functionality to capture and react to an event
    //   for the checkboxes when they are checked by the user and
    //   the text fields to know when text is entered. Also to react to the
    //   Enter button being pushed and the edit button being pushed.
    public void actionPerformed(ActionEvent evt)
    { // Opens actionPerformed method.
         if((evt.getSource() == currentMileage) || (evt.getSource() == enter))
              { // Opens if statement.
                // Retrieves the text from the currentMileage text field
                //  and assigns it to the variable currentMileageText of
                //  type String.
                String currentMileageText = currentMileage.getText();
                lblcurrentMileage.setText("Current Mileage is:    " + currentMileageText);
                // After printing text to JLabel, hide the text field.
                currentMileage.setVisible(false);
           } // Ends if statement.
          if((evt.getSource() == numofGallonsBought) || (evt.getSource() == enter))
              { // Opens if statement.
                // Retrieves the text from the numofGallonsBought text field
                //  and assigns it to the variable numofGallonsBoughtText of
                //  type String.
                String numofGallonsBoughtText = numofGallonsBought.getText();
                lblnumofGallonsBought.setText("The number of gallons of gas bought is:    " + numofGallonsBoughtText);
                // After printing text to JLabel, hide the text field.
                numofGallonsBought.setVisible(false);
           } // Ends if statement.
           if((evt.getSource() == dateofPurchase) || (evt.getSource() == enter))
                     { // Opens if statement.
                       // Retrieves the text from the dateofPurchase text field
                       //  and assigns it to the variable dateofPurchaseText of
                       //  type String.
                       String dateofPurchaseText = dateofPurchase.getText();
                       lbldateofPurchase.setText("The date of this purchase is:    " + dateofPurchaseText);
                       // After printing text to JLabel, hide the text field.
                       dateofPurchase.setVisible(false);
           } // Ends if statement.
           if((evt.getSource() == pricePerGallon) || (evt.getSource() == enter))
                            { // Opens if statement.
                              // Retrieves the text from the pricePerGallon text field
                              //  and assigns it to the variable pricePerGallonText of
                              //  type String.
                              String pricePerGallonText = pricePerGallon.getText();
                              lblpricePerGallon.setText("The price per gallon of gas for this purchase is:    " + pricePerGallonText);
                              // After printing text to JLabel, hide the text field.
                              pricePerGallon.setVisible(false);
           } // Ends if statement.
           if((evt.getSource() == gasBrand) || (evt.getSource() == enter))
                       { // Opens if statement.
                         // Retrieves the text from the gasBrand text field
                         //  and assigns it to the variable gasBrandText of
                         //  type String.
                         String gasBrandText = gasBrand.getText();
                         lblgasBrand.setText("The Brand of gas for this purchase is:    " + gasBrandText);
                         // After printing text to JLabel, hide the text field.
                         gasBrand.setVisible(false);
           } // Ends if statement.
           // This provides control statements for the Edit button. If the
           //  Edit button is clicked, then the text fields are visible again.
           if(evt.getSource() == edit)
           { // Opens if statement.
             // If the edit button is pressed, the following are set to
             //  visible.
                currentMileage.setVisible(true);
                numofGallonsBought.setVisible(true);
                dateofPurchase.setVisible(true);
                pricePerGallon.setVisible(true);
                gasBrand.setVisible(true);
         }// Closes if statement.
    } // Closes actionPerformed method.
         private class CheckBoxHandler implements ItemListener
         { // Opens inner class
              public void itemStateChanged (ItemEvent e)
              {// Opens the itemStateChanged method.
                   JCheckBox source = (JCheckBox) e.getSource();
                        if(e.getStateChange() == ItemEvent.SELECTED)
                             source.setForeground(Color.blue);
                        else
                             source.setForeground(Color.black);
                        }// Closes the itemStateChanged method
                   }// Closes the CheckBoxHandler class.
    } //Ends the public class collectTextInput classThe error I keep receiving is as follows:
    C:\jdk131\CollectTextInput.java:128: missing method body, or declare abstract
         public void buildImagePanel();
    ^
    C:\jdk131\CollectTextInput.java:142: missing method body, or declare abstract
         public void buildDatumPanel();
    ^
    2 errors
    I have looked this error up in three different places but the solutions do not apply to what I am trying to accomplish.
    Any help would be greatly appreciated!! Thanks!
    Susan

    C:\jdk131\CollectTextInput.java:128: missing methodbody, or declare ?abstract
    public void buildImagePanel();^
    C:\jdk131\CollectTextInput.java:142: missing methodbody, or declare abstract
    public void buildDatumPanel();Just remove the semicolons.
    Geesh! If I had a hammer I would be hitting myself over the head with it right now!!! What an obviously DUMB newbie mistake!!!
    Thanks so much for not making me feel stupid! :-)
    Susan

  • C# compiling error: 'System.Array' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'System.Array' could be found (are you missing a using directive or an assembly reference?)

    Hello experts,
    I'm totally new to C#. I'm trying to modify existing code to automatically rename a file if exists. I found a solution online as follows:
    string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
            string tempFileName = fileName;
            int count = 1;
            while (allFiles.Contains(tempFileName ))
                tempFileName = String.Format("{0} ({1})", fileName, count++); 
            output = Path.Combine(folderPath, tempFileName );
            string fullPath=output + ".xml";
    However, it gives the following compilation errors
    for the Select and Contain methods respectively.:
    'System.Array' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'System.Array' could be found
    (are you missing a using directive or an assembly reference?)
    'System.Array' does not contain a definition for 'Contains' and no extension method 'Contains' accepting a first argument of type 'System.Array' could be
    found (are you missing a using directive or an assembly reference?)
    I googled on these errors, and people suggested to add using System.Linq;
    I did, but the errors persist. 
    Any help and information is greatly appreciated.
    P. S. Here are the using clauses I have:
    using System;
    using System.Data;
    using System.Windows.Forms;
    using System.IO;
    using System.Collections.Generic;
    using System.Text;
    using System.Linq;

    Besides your issue with System.Core, you also have a problem with the logic of our code, particularly your variables. It is confusing what your variables represent. You have an infinite loop, so the last section of code is never reached. Take a look 
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.IO;
    namespace consAppFileManipulation
    class Program
    static void Main(string[] args)
    string fullPath = @"c:\temp\trace.log";
    string folderPath = @"c:\temp\";
    string fileName = "trace.log";
    string output = "";
    string fileNameOnly = Path.GetFileNameWithoutExtension(fullPath);
    string extension = Path.GetExtension(fullPath);
    string path = Path.GetDirectoryName(fullPath);
    string newFullPath = fullPath;
    string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
    string tempFileName = fileName;
    int count = 1;
    //THIS IS AN INFINITE LOOP
    while (allFiles.Contains(fileNameOnly))
    tempFileName = String.Format("{0} ({1})", fileName, count++);
    //THIS CODE IS NEVER REACHED
    output = Path.Combine(folderPath, tempFileName);
    fullPath = output + ".xml";
    //string fullPath = output + ".xml";
    UML, then code

  • Java.lang.RuntimeException: Uncompilable source code - missing method body

    Hi,
    I am getting the following error at runtime
    java.lang.RuntimeException: Uncompilable source code - missing method body, or declare abstractwhen I try to instantiate a class using reflexion as following:
    MyInstance = MyClass.newInstance(); I have tried to find some explanation using Google, but could not find any that fit my case. MyClass's implementation has a public constructor with no parameter. There is no error at compile time when cleaning and building all code.
    Anyone has tips about what could cause this error?
    Thanks.

    Jrm wrote:
    It is not my code originally... You are making far too many unchecked assumptions about the reality of this situation to even get close to what that reality it is... Get over patronizing, it would improve your social/people skills... Thanks !It is your own problem that you perceive something as patronizing, while in fact it was only an honest and straight to the point attempt to help you. This forum does not deal in sensitivity, it gets in the way of helping people to see the error of their ways.

  • Missing method body

    class Board
        public static void main(String[] args)
            Board example = new Board();
        private Board();
            char array[][];
            array = new char[3][3];
            for (int i = 0; i < 3; i++)
                for (int j = 0; j < 3; j++)
                    array[i][j] = '.';
                    System.out.println(array[i][j]);
    }compiler says missing method body, but i can't think where the error is? private Board has to be a constructor.

    Are you using a text editor or an IDE? If you are already fairly familiar with the Java programming language and the java/javac and you understand how classpath works, then you might consider to step over from the text editor to an IDE, such as Eclipse. It will save time and effort in developing. I tried to reproduce your problem in Eclipse and it clearly understrikes the "Board();" part during typing and says "This method requires a body instead of a semicolon" which makes much more sense.

  • Missing method body and cannot resolve symbol

    I keep getting these two errors when trying to compile. I know that I need to call my fibonacci and factorial functions from the main function. Is this why I am getting the missing method body error? How do I correct this?
    Am I getting the cannot resolve symbol because I have to set the num and fact to equal something?
    Thanks
    public class Firstassignment
    public static void main(String[]args)
         System.out.println();
    public static void fibonacci(String[]args);
         int even=1;
         int odd=1;
         while (odd<=100);
         System.out.println(even);
         int temp = even;
         even = odd;
         odd = odd + temp;
    public static void factorial (String[]args);
         for (int count=1;
         count<=num;
         count++);
         fact = fact * count;
         outputbox.printLine("Factorial of" + num + "is" + fact);

    Hey... :o)
    the problem is that you've put semicolons at the end of the function signature, like this:
    public static void fibonacci(String[]args);
    }that should happen only when the function is abstract... so ur function should actually look like this:
    public static void fibonacci(String[]args)
    }also, i think you've missed out on the declarations (like what are fact and num??)....

  • Missing method body or declare abstract...

    Hi There,
    Im working on an assignment that works with the math class and performs a bunch of mathematical functions. Im trying to declare the different fields in the math class and I keep getting error messages!!
    This is what I have right now
    public class Math
        // Returns the absolute value of a double value.
        double abs(double a);
        // Returns the absolute value of a int value.
        int abs(int a);
        //Returns the greater of two double values.
        double max(double a, double b);
        //Returns the greater of two int values.
        int max(int a, int b);
        // Returns the lesser of two double values.
        double min(double a, double b);
        // Returns the lesser of two double values.
        int min( int a, int b);
        // Returns the value of the first argument raised to the power of
        // the second argument.
        double pow(double a, double b);
        // Returns the remainder of division of two integers.
        int remainder(int a, int b);
        // Returns the closest long to the argument.
        long round(double a);
        // Returns the sum of all the elements in an array of doubles.
        double sum(double [] doubleArr);
        // Returns the sum of all the elements in an array of ints.
        int sum(int [] intArr);
        // Storage for the list of integers used for the int sum method.
        private int [] intArray = {5, 10, 15, 20};
        // Storage for the list of doubles to be used double sum method.
        private double [] doubleArray = {5.25, 10.00, 14.50, 21.90};
        }When I try and compile it tells me that Im missing method body or declare abstract.
    I originally had this
       // Returns the absolute value of a double value.
        double abs;
        // Returns the absolute value of a int value.
        int abs;
        //Returns the greater of two double values.
        double max;
        //Returns the greater of two int values.
        int max;
        // Returns the lesser of two double values.
        double min;
        // Returns the lesser of two double values.
        int min;
        // Returns the value of the first argument raised to the power of
        // the second argument.
        double pow;
        // Returns the remainder of division of two integers.
        int remainder;
        // Returns the closest long to the argument.
        long round;
        // Returns the sum of all the elements in an array of doubles.
        double sum(double [] doubleArr);
        // Returns the sum of all the elements in an array of ints.
        int sum(int [] intArr);
        // Storage for the list of integers used for the int sum method.
        private int [] intArray = {5, 10, 15, 20};
        // Storage for the list of doubles to be used double sum method.
        private double [] doubleArray = {5.25, 10.00, 14.50, 21.90};When i tried doing this it told me that I had already declared the field previously when it got the the field with the same name and thats why I added the bit in brackets.....
    Im so lost... can anybody hep????

    hi,
    here is your code...
    modified by correcting my bad habit...
    he..he...
    public class Math
        // Returns the absolute value of a double value.
        double abs(double a){return 0.0;}
        // Returns the absolute value of a int value.
        int abs(int a){return 0;}
        //Returns the greater of two double values.
        double max(double a, double b){return 0.0;}
        //Returns the greater of two int values.
        int max(int a, int b){return 0;}
        // Returns the lesser of two double values.
        double min(double a, double b){return 0.0;}
        // Returns the lesser of two double values.
        int min( int a, int b){return 0;}
        // Returns the value of the first argument raised to the power of
        // the second argument.
        double pow(double a, double b){return 0.0;}
        // Returns the remainder of division of two integers.
        int remainder(int a, int b){return 0;}
        // Returns the closest long to the argument.
        long round(double a){return 0.0;}
        // Returns the sum of all the elements in an array of doubles.
        double sum(double [] doubleArr){return 0.0;}
        // Returns the sum of all the elements in an array of ints.
        int sum(int [] intArr){return 0;}
        // Storage for the list of integers used for the int sum method.
        private int [] intArray = {5, 10, 15, 20};
        // Storage for the list of doubles to be used double sum method.
        private double [] doubleArray = {5.25, 10.00, 14.50, 21.90};
        }if you want to extend Math class to any other class.. then make all the methods abstract
    dhaval.
    Edited by: Dhaval.Yoganandi on 1 Mar, 2008 3:48 PM

  • Compiler Error, Missing Return Statement

    This line of code for the begining of a method that reads a file always throws the compiler error, missing return statement. I can't figure out how to fix it!
    public String[] read(InputStream list) throws Exception {
    Could someone please help?

    you might need to post more code, but basically the
    compiler is complaining because you do not have a
    return statement at the end of your method.
    if you do not have a return statement (with a matching
    return type) then the compiler will complain. If you
    don't understand this then post the code to your
    method and we can get it fixed.
    public String[] read(InputStream list) throws
    Exception {
    String[] stringArray;
    return stringArray;
    The code is the most complex I have written so far but here is some of it. (the begining and the end)
    public String[] read(InputStream list) throws Exception {
    if (list != null) {
    String[] stringArray = null;
    try {
    while {
    //add strings to string array
    }//end of while
    return stringArray;
    }// end try
    catch{
    }//end of method

  • Compilation error and method for inheritance

    1.I've tried to construct @create table for an entity.an error occurs which is:
    'Warning: Type Body created with compilation errors.'
    Why and how to solve it?
    2.as oracle 8 does not support inheritance,the other method would be through nested table.what else could it be?

    stop and start the siebel server will solve.
    Regards
    Ahmed

  • Compilation error while calling static method from another class

    Hi,
    I am new to Java Programming. I have written two class files Dummy1 and Dummy2.java in the same package Test.
    In Dummy1.java I have declared a static final variable and a static method as you can see it below.
    package Test;
    import java.io.*;
    public class Dummy1
    public static final int var1= 10;
    public static int varDisp(int var2)
    return(var1+var2);
    This is program is compiling fine.
    I have called the static method varDisp from the class Dummy2 and it is as follows
    package Test;
    import java.io.*;
    public class Dummy2
    public int var3=15;
    public int test=0;
    test+=Dummy1.varDisp(var3);
    and when i compile Dummy2.java, there is a compilation error <identifier > expected.
    Please help me in this program.

    public class Dummy2
    public int var3=15;
    public int test=0;
    test+=Dummy1.varDisp(var3);
    }test+=Dummy1.varDisplay(var3);
    must be in a method, it cannot just be out somewhere in the class!

  • Experiencing "The type or namespace name 'DirectoryServices' does not exist in the namespace 'System' (are you missing an assembly reference?)" compilation error

    I am just starting to implement a new user login authentication process wherein after prompting user for username & password, I hope to authenticate them againts our company Active Directory user data. Since I am just starting, I only have very few things
    done at this point which is how I wanted to work on this so that my development environment is still at its simplest state.
    I am using the following for development:
    MS-Visual Studios Professional 2013 Version 12.0.30501.00 Update 2, and
    MS .NET Framework Version 4.5.50938.
    Here are my project solution's current items:
    Web.config:
    <?xml version="1.0"?>
    <!--
    For more information on how to configure your ASP.NET application, please visit
    http://go.microsoft.com/fwlink/?LinkId=169433
    -->
    <configuration>
    <system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
    </system.web>
    <system.webServer>
    <defaultDocument enabled="true">
    <files>
    <add value="Login.aspx" />
    </files>
    </defaultDocument>
    </system.webServer>
    </configuration>
    Web.Debug.config:
    <?xml version="1.0" encoding="utf-8"?>
    <!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
    <configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
    <!--
    In the example below, the "SetAttributes" transform will change the value of
    "connectionString" to use "ReleaseSQLServer" only when the "Match" locator
    finds an attribute "name" that has a value of "MyDB".
    <connectionStrings>
    <add name="MyDB"
    connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
    xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
    </connectionStrings>
    -->
    <system.web>
    <compilation xdt:Transform="RemoveAttributes(debug)" />
    <!--
    In the example below, the "Replace" transform will replace the entire
    <customErrors> section of your web.config file.
    Note that because there is only one customErrors section under the
    <system.web> node, there is no need to use the "xdt:Locator" attribute.
    <customErrors defaultRedirect="GenericError.htm"
    mode="RemoteOnly" xdt:Transform="Replace">
    <error statusCode="500" redirect="InternalError.htm"/>
    </customErrors>
    -->
    </system.web>
    </configuration>
    Web.Assemblies.config:
    <?xml version="1.0"?>
    <configuration>
    <system.web>
    <compilation debug="false" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
    <assemblies>
    <add assembly="System.DirectoryServices, Version=4.0.0.0, Culture=neutral PublicKeyToken=b03f5f7f11d50a3a"/>
    </assemblies>
    </system.web>
    </configuration>
    Login.aspx:
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" %>
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title></title>
    </head>
    <body>
    <form id="form1" runat="server">
    <div id="loginForm" style="height: 562px; width: 399px; margin-left: 0px" title="Login Form">
    &nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Label ID="loginPageLabel" runat="server" Font-Bold="True" Font-Names="Arial Black" Font-Size="Large" Text="Please Log In"></asp:Label>
    <br />
    <br />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Label ID="loginUsernameLabel" runat="server" Text="Username:"></asp:Label>
    &nbsp;&nbsp;&nbsp;
    <asp:TextBox ID="loginUserNameTextBox" runat="server" OnTextChanged="loginUserNameTextBox_TextChanged" Width="213px" Wrap="False" AutoPostBack="True" TabIndex="1"></asp:TextBox>
    <br />
    <br />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Label ID="loginPasswordLabel" runat="server" Text="Password:"></asp:Label>
    &nbsp;&nbsp;&nbsp;
    <asp:TextBox ID="loginPasswordTextBox" runat="server" OnTextChanged="loginPasswordTextBox_TextChanged" Width="212px" Wrap="False" AutoPostBack="True" TabIndex="2"></asp:TextBox>
    <br />
    <br />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:RadioButton ID="loginUAradioButton" runat="server" Font-Bold="True" OnCheckedChanged="loginUAradioButton_CheckedChanged" Text="TUPSS Associate" AutoPostBack="True" TabIndex="3" />
    &nbsp;&nbsp;
    <asp:RadioButton ID="loginAFradioButton" runat="server" Font-Bold="True" OnCheckedChanged="loginAFradioButton_CheckedChanged" Text="Area Franchisee" AutoPostBack="True" TabIndex="4" />
    <br />
    <br />
    <br />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Button ID="loginSubmitButton" runat="server" Font-Bold="True" OnClick="loginSubmitButton_Click" Text="Log In" TabIndex="5" />
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <asp:Button ID="loginCancelButton" runat="server" Font-Bold="True" OnClick="loginCancelButton_Click" Text="Cancel" TabIndex="6" />
    <br />
    <br />
    &nbsp;&nbsp;
    <asp:Label ID="loginStatusInstructionLabel" runat="server" Text="Status/Instruction:"></asp:Label>
    <br />
    &nbsp;&nbsp;
    <asp:TextBox ID="loginStatusInstructionTextBox" runat="server" Height="230px" MaxLength="100" Rows="12" TextMode="MultiLine" Width="360px" EnableViewState="False" OnTextChanged="loginStatusInstructionTextBox_TextChanged" ReadOnly="True" TabIndex="-1"></asp:TextBox>
    </div>
    </form>
    </body>
    </html>
    Login.aspx.cs:
    using System;
    using System.DirectoryServices;
    public partial class Login : System.Web.UI.Page
    private string uName; // user-entered username
    private string pWord; // user-entered password
    private int loginLoadCycles; // just keeping track of how many times Page_Load is called
    protected void Page_Load(object sender, EventArgs e)
    if (this.loginUserNameTextBox.Text == String.Empty &&
    this.loginPasswordTextBox.Text == String.Empty &&
    this.loginUAradioButton.Checked == false &&
    this.loginAFradioButton.Checked == false)
    this.loginInit();
    this.setLoginVisibilityAndFocus();
    this.loginLoadCycles += 1;
    private void loginInit()
    this.uName = String.Empty;
    this.pWord = String.Empty;
    this.loginLoadCycles = 0;
    private void setLoginVisibilityAndFocus()
    // Decide on whether or not the Login submit & cancel buttons should be enabled or not
    if ( this.loginUserNameTextBox.Text == String.Empty ||
    (this.loginUAradioButton.Checked == false && this.loginAFradioButton.Checked == false) )
    this.loginSubmitButton.Enabled = false;
    this.loginCancelButton.Enabled = false;
    this.loginStatusInstructionTextBox.Text = "Please specify if you are a TUPSS Associate or an Area Franchisee by checking either the 'TUPSS Associate' or 'Area Franchisee' checkbox.";
    else
    this.loginSubmitButton.Enabled = true;
    this.loginCancelButton.Enabled = true;
    if (this.loginPasswordTextBox.Text == String.Empty)
    this.loginStatusInstructionTextBox.Text = "Now that you have entered your username & type, please enter your password.";
    else
    this.loginStatusInstructionTextBox.Text = "When you are ready, please select either the Log In button to login, or the Cancel button to abort.";
    if (this.loginUAradioButton.Checked == false && this.loginAFradioButton.Checked == false)
    this.SetFocus(this.loginUAradioButton);
    else if (this.loginUserNameTextBox.Text == String.Empty)
    this.SetFocus(this.loginUserNameTextBox);
    else if (this.loginPasswordTextBox.Text == String.Empty)
    this.SetFocus(this.loginPasswordTextBox);
    else
    this.SetFocus(this.loginSubmitButton);
    protected void loginUserNameTextBox_TextChanged(object sender, EventArgs e)
    protected void loginPasswordTextBox_TextChanged(object sender, EventArgs e)
    // For some reason, after specifying that the password entry box's textmode to 'Password' setting,
    // the UI's password textbox is emptied
    this.loginStatusInstructionTextBox.Text = "NOTICE:\nThis application is still under development.\n\n" +
    "This is why the password you entered is visible. Once this portion of the application is ready, it will be masked.\n\n" +
    "Also, still need to figure out why when changing this to Password entry mode to mask its entered data, password is getting reset.";
    protected void loginSubmitButton_Click(object sender, EventArgs e)
    this.loginLoadCycles = 0;
    this.uName = this.loginUserNameTextBox.Text;
    this.pWord = this.loginPasswordTextBox.Text;
    if (this.loginUAradioButton.Checked == true && this.loginAFradioButton.Checked == false)
    this.loginLADPauthenticate('U'); // authenticate UPS Associates against UPS Corp's Active Directory
    else if (this.loginUAradioButton.Checked == false && this.loginAFradioButton.Checked == true)
    this.loginLADPauthenticate('A'); // authenticate Area Franchisees against UPS Store's iNet Active Directory
    else
    // set colors to show that this is an error instead of a status message or instruction
    this.loginStatusInstructionTextBox.Text = "ERROR: Cannot log in without specifying if you are an UPS Associate or an Area Franchisee!";
    protected void loginCancelButton_Click(object sender, EventArgs e)
    this.loginStatusInstructionTextBox.Text = "You have selected to cancel from logging in...";
    // Still need to plan what to do when user cancels out of logging in. For now, just initialize class attributes
    this.loginInit();
    protected void loginUAradioButton_CheckedChanged(object sender, EventArgs e)
    String msg = String.Empty;
    if (this.loginUAradioButton.Checked == true)
    this.loginAFradioButton.Checked = false;
    msg = "Thanks for specifying that you are a TUPSS Associate. ";
    if (this.loginUserNameTextBox.Text == String.Empty)
    msg += "Now please specify your username.";
    else if (this.loginPasswordTextBox.Text == String.Empty)
    msg += "Now please enter your password.";
    this.loginStatusInstructionTextBox.Text = msg;
    protected void loginAFradioButton_CheckedChanged(object sender, EventArgs e)
    String msg = String.Empty;
    if (this.loginAFradioButton.Checked == true)
    this.loginUAradioButton.Checked = false;
    msg = "Thanks for specifying that you are an Area Franchisee. ";
    if (this.loginUserNameTextBox.Text == String.Empty)
    msg += "Now please specify your username.";
    else if (this.loginPasswordTextBox.Text == String.Empty)
    msg += "Now please enter your password.";
    this.loginStatusInstructionTextBox.Text = msg;
    private void loginLADPauthenticate(char whichActiveDirectory)
    String msg = "Authenticating user '" + this.uName + "' with password '" + this.pWord + "' against ";
    if (whichActiveDirectory == 'U')
    msg += "UPS Corp's Active Directory...";
    else if (whichActiveDirectory == 'A')
    msg += "The UPS Store's Franchisee Active Directory...";
    msg += "\n\nNOTICE:\nThis is still under development.\n\nAt this point, this application is supposed to do something else now but is not yet ready.";
    this.loginStatusInstructionTextBox.Text = msg;
    this.loginStatusInstructionTextBox.AutoPostBack = true;
    // Authenticate using LDAP
    protected void loginStatusInstructionTextBox_TextChanged(object sender, EventArgs e)
    I confirmed that I have System.DirectoryServices.dll located in
    C:\Windows\Microsoft.NET\assembly\GAC_MSIL\v4.0_4.0.0.0__b03f5f7f11d50a3a\ folder and that I as well as System have read as well as read&execute privileges
    not only to all folders in its path but also to the DLL file itself.
    I would appreciate any help in trying to resolve this compilation error so that I can proceed with implementing LDAP features for this endeavor.
    Thanks so much,
    hguico @ The UPS Store

    Hi,
    For web application problem, please post your thread in
    ASP.NET forum.
    Best Wishes!
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey. Thanks<br/> MSDN Community Support<br/> <br/> Please remember to &quot;Mark as Answer&quot; the responses that resolved your issue. It is a common way to recognize those who have helped you, and
    makes it easier for other visitors to find the resolution later.

Maybe you are looking for