Print a line after each constructor

Would one of you java gods tell me how i can print a line after each constructor that tells me that the constructor has been constructed?
* Employee.java
* Created on April 28, 2007, 11:58 PM
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
* @author Pete Berardi
package edu.ctu.peteberardi.phase3db;
import java.util.Scanner;
public abstract class Employee extends Object
    protected String EmpName;
    protected String EmpAddress;
    protected String EmpSsn;
    protected String EmpEmployeeID;
    protected double EmpYearlySalary;
    protected double computePay;
    protected String Constructor;
    /** Creates a new instance of Employee */
    public Employee(String name, String address, String ssn,
            String id, double salary, double pay, String cvariable)
      name = EmpName;
      address = EmpAddress;
      ssn = EmpSsn;
      id = EmpEmployeeID;
      salary = EmpYearlySalary;
      pay = computePay;
    public void setEmpName(String name)
        EmpName = name;
    public String getEmpName()
        return EmpName;
    public void setEmpAdress(String address)
        EmpAddress = address;
    public String getEmpAddress()
        return EmpAddress;
    public void setEmpSsn(String ssn)
         EmpSsn = ssn; 
    public String getEmpSsn()
        return EmpSsn;
    public void setEmpID(String id)
        EmpEmployeeID = id;
    public String getEmployeeID()
        return EmpEmployeeID;
    public void setEmpYearlySalary(double salary)
        EmpYearlySalary = salary;
    public double getEmpYearlySalary()
        return EmpYearlySalary;
    public void setcomputePay(double pay)
        computePay = pay;
    public double computePay()
        return computePay;
      public void setContstructor(String cvariable)
         Constructor = cvariable;
    public String Constructor()
        return Constructor;
   public static void main( String args[])
      System.out.print("Constructor has been constructed");
 

I do not know why you have declared the class as abstract. Abstract class must contain at least one abstract method.
In your code, there is no abstract method.
public Employee(String name, String address, String ssn,
            String id, double salary, double pay, String cvariable)
      name = EmpName;
      address = EmpAddress;
      ssn = EmpSsn;
      id = EmpEmployeeID;
      salary = EmpYearlySalary;
      pay = computePay;
      System.out.println("Constructor created");
     }The above code works only when you instantiate the object for the class. If it is abstract class, it will not work.
Abstract class cannot be instantiated.

Similar Messages

  • This is regarding printing vertical lines for each and every field

    Hi to all.....
    1....Hi
    here is a requirement
    i want to print vertical lines and horizontal lines for each and every field in the output of a report.Here i want to see the output just like table i.e i want to draw line after each field.
                             suppose if the output list contains just 10 records, then the vertical line must end for 10 records.how to draw vertical lines for this requirement.
    thanks and regards,
    k.swaminath

    Hi
    In report you can use
    sy-uline for horizontal line
    sy-vline for vertical lines.
    Check this sample report
    DATA: BEGIN OF USR_TABL OCCURS 0.
    INCLUDE STRUCTURE UINFO.
    DATA: END OF USR_TABL.
    DATA: L_LENGTH TYPE I,
    T_ABAPLIST LIKE ABAPLIST OCCURS 0 WITH HEADER LINE, BEGIN OF T_USER OCCURS 0, COUNTER TYPE I, SELECTION TYPE C, MANDT LIKE SY-MANDT, BNAME LIKE SY-UNAME, NAME_FIRST LIKE V_ADRP_CP-NAME_FIRST, NAME_LAST LIKE V_ADRP_CP-NAME_LAST, DEPARTMENT LIKE V_ADRP_CP-DEPARTMENT, TEL_NUMBER LIKE V_ADRP_CP-TEL_NUMBER, END OF T_USER, L_CLIENT LIKE SY-MANDT, L_USERID LIKE UINFO-BNAME, L_OPCODE TYPE X, L_FUNCT_CODE(1) TYPE C, L_TEST(200) TYPE C.
    L_OPCODE = 2.
    CALL ‘ThUsrInfo’ ID ‘OPCODE’ FIELD L_OPCODE
    ID ‘TAB’ FIELD USR_TABL-*SYS*.
    CLEAR T_USER. REFRESH T_USER.
    LOOP AT USR_TABL.
    T_USER-MANDT = USR_TABL-MANDT. T_USER-BNAME = USR_TABL-BNAME. APPEND T_USER.
    ENDLOOP.
    SORT T_USER.
    DELETE ADJACENT DUPLICATES FROM T_USER.
    LOOP AT T_USER.
    T_USER-COUNTER = SY-TABIX. SELECT V~NAME_FIRST V~NAME_LAST V~DEPARTMENT V~TEL_NUMBER INTO (T_USER-NAME_FIRST, T_USER-NAME_LAST, T_USER-DEPARTMENT, T_USER-TEL_NUMBER) FROM USR21 AS U JOIN V_ADRP_CP AS V ON U~PERSNUMBER = V~PERSNUMBER AND U~ADDRNUMBER = V~ADDRNUMBER WHERE U~BNAME = T_USER-BNAME. ENDSELECT. MODIFY T_USER.
    ENDLOOP.
    SORT T_USER BY NAME_LAST NAME_FIRST.
    PERFORM DISPLAY_LIST.
    TOP-OF-PAGE.
    PERFORM DISPLAY_MENU.
        * End of top-of-page
    TOP-OF-PAGE DURING LINE-SELECTION.
    PERFORM DISPLAY_MENU.
        * End of top-of-page during line-selection
    AT LINE-SELECTION.
    IF SY-CUROW = 2. IF SY-CUCOL < 19. T_USER-SELECTION = ‘X’. MODIFY T_USER TRANSPORTING SELECTION WHERE SELECTION = ‘’. PERFORM DISPLAY_LIST. ELSEIF SY-CUCOL < 36. CLEAR T_USER-SELECTION. MODIFY T_USER TRANSPORTING SELECTION WHERE SELECTION = ‘X’. PERFORM DISPLAY_LIST. ELSEIF SY-CUCOL < 50. PERFORM TRANSFER_SELECTION. PERFORM POPUP_MSG. ELSEIF SY-CUCOL < 67. PERFORM TRANSFER_SELECTION. SORT T_USER BY NAME_LAST. PERFORM DISPLAY_LIST. ELSEIF SY-CUCOL < 81. PERFORM TRANSFER_SELECTION. SORT T_USER BY NAME_FIRST. PERFORM DISPLAY_LIST. ELSEIF SY-CUCOL < 93. PERFORM TRANSFER_SELECTION. SORT T_USER BY MANDT. PERFORM DISPLAY_LIST. ENDIF. ENDIF.
        * End of line-selection
    *& Form DISPLAY_LIST
    FORM DISPLAY_LIST.
    SY-LSIND = 0.
    FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
    LOOP AT T_USER.
    WRITE: / SY-VLINE, T_USER-SELECTION AS CHECKBOX, SY-VLINE, T_USER-MANDT, SY-VLINE, T_USER-BNAME, SY-VLINE, T_USER-NAME_FIRST(15), SY-VLINE, T_USER-NAME_LAST(15), SY-VLINE, T_USER-DEPARTMENT, SY-VLINE, T_USER-TEL_NUMBER(20), SY-VLINE. HIDE: T_USER-COUNTER, T_USER-SELECTION.
    ENDLOOP.
    FORMAT COLOR OFF.
    WRITE: /(108) SY-ULINE.
    ENDFORM. ” DISPLAY_LIST
    *& Form DISPLAY_MENU
    FORM DISPLAY_MENU.
    FORMAT COLOR COL_HEADING HOTSPOT. WRITE: (91) SY-ULINE, / SY-VLINE NO-GAP, (4) ICON_SELECT_ALL NO-GAP, ‘Select All’, SY-VLINE NO-GAP, (4) ICON_DESELECT_ALL NO-GAP, ‘Deselect All’, SY-VLINE NO-GAP, (4) ICON_SHORT_MESSAGE NO-GAP, ‘Send Popup’, SY-VLINE NO-GAP, (4) ICON_SORT_UP NO-GAP, ‘Last Name’ NO-GAP, SY-VLINE NO-GAP, (4) ICON_SORT_UP NO-GAP, ‘First Name’ NO-GAP, SY-VLINE NO-GAP, (4) ICON_SORT_UP NO-GAP, ‘Client’ NO-GAP, SY-VLINE, /(91) SY-ULINE, /(108) SY-ULINE. FORMAT HOTSPOT OFF. WRITE: / SY-VLINE, ’ ‘, SY-VLINE, ‘Cli’, SY-VLINE, ‘User ‘, SY-VLINE, ‘First Name ‘, SY-VLINE, ‘Last Name ‘, SY-VLINE, ‘Department ‘, SY-VLINE, ‘Telephone ‘, SY-VLINE, /(108) SY-ULINE. FORMAT COLOR OFF.
    ENDFORM. ” DISPLAY_MENU
    *& Form TRANSFER_SELECTION
    FORM TRANSFER_SELECTION.
    DO. READ LINE SY-INDEX FIELD VALUE T_USER-SELECTION. IF SY-SUBRC <> 0. EXIT. ENDIF. MODIFY T_USER TRANSPORTING SELECTION WHERE COUNTER = T_USER-COUNTER. ENDDO. CLEAR T_USER.
    ENDFORM. ” TRANSFER_SELECTION
    *& Form POPUP_MSG
    FORM POPUP_MSG.
    DATA: L_MSG LIKE SM04DIC-POPUPMSG VALUE ‘Experimental Message’, L_LEN TYPE I, L_RET TYPE C. LOOP AT T_USER WHERE SELECTION = ‘X’. PERFORM GET_MESSAGE CHANGING L_MSG L_RET. EXIT. ENDLOOP. IF L_RET = ‘A’. “User cancelled the message EXIT. ENDIF.
        * Get the message text
    L_LEN = STRLEN. LOOP AT T_USER WHERE SELECTION = ‘X’. CALL FUNCTION ‘TH_POPUP’ EXPORTING CLIENT = T_USER-MANDT USER = T_USER-BNAME MESSAGE = L_MSG MESSAGE_LEN = L_LENGTH
        * CUT_BLANKS = ’ ’
    EXCEPTIONS USER_NOT_FOUND = 1 OTHERS = 2. IF SY-SUBRC <> 0. WRITE: ‘User ‘, T_USER-BNAME, ‘not found.’. ENDIF. ENDLOOP. IF SY-SUBRC <> 0.
        * Big error! No user has been selected.
    MESSAGE ID ‘AT’ TYPE ‘E’ NUMBER ‘315’ WITH ‘No user selected!’. EXIT. ENDIF.
    ENDFORM. ” POPUP_MSG
    *& Form GET_MESSAGE
    FORM GET_MESSAGE CHANGING P_L_MSG LIKE SM04DIC-POPUPMSG
    P_RETURNCODE TYPE C.
    DATA: BEGIN OF FIELDS OCCURS 1. INCLUDE STRUCTURE SVAL.
    DATA: END OF FIELDS, RETURNCODE TYPE C.
    FIELDS-TABNAME = ‘SM04DIC’.
    FIELDS-FIELDNAME = ‘POPUPMSG’.
    FIELDS-FIELDTEXT = ‘Message :’. CONCATENATE ’ – Msg from’ SY-UNAME ‘.’ INTO FIELDS-VALUE SEPARATED BY ’ ‘. APPEND FIELDS.
    CALL FUNCTION ‘POPUP_GET_VALUES’
    EXPORTING POPUP_TITLE = ‘Supply the popup message’
    IMPORTING RETURNCODE = P_RETURNCODE
    TABLES FIELDS = FIELDS.
    IF P_RETURNCODE = ‘A’.
    EXIT.
    ELSE.
    READ TABLE FIELDS INDEX 1.
    P_L_MSG = FIELDS-VALUE.
    ENDIF.
    ENDFORM. ” GET_MESSAGE
    *—End of Program
    Regards
    Pavan

  • Inserting a new line after each tag of an xml

    Hi,
    I am having a requirement where i need to insert a newline after each tag<> of an xml. I am sending an xml to target system using JMS adapter and the target system has UNIX as OS.
    In unix system if we see the output xml, it will be in a single string as shown
    <?xml version="1.0" encoding="ISO-8859-1"?><messages><Field1\><Field2\>.........................</messages>
    But the desired output should be in the below format
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <messages>
    <Field1\>
    <Field2\>
    </messages>
    And there should not be any indentation for the xml. It should be in the above format it self.

    Hi,
    I believe this can be achieved through XSLT or JAVA Mapping.
    Please refer to the following link:
    XSLT Mapping:
    Inserting a new line after each tag of an xml
    JAVA Mapping:
    In Java Mapping ,all you have to do is to make a code that does a search and replace.
    Hope this helps,

  • Pages is sending my documents in docx format, but windows unable to open them. They arrive blank or can only be read as a single line at a time. When view prior to sending the document is divided with black lines after each sentence.

    Pages is sending my documents in docx format, but windows unable to open them. They arrive blank or can only be read as a single line at a time. When viewed prior to sending, the document is divided with black lines after each sentence.

    Windows will only be able to open these if you have Word 2007+. Older versions of Word, for example Word 2003 would require a compatibility pack.
    Perhaps you can try 'Saving As' a different file type instead?
    Regards,
    Steve

  • Need to create a a line after each subtotal-Smartform

    Hi I need to create a uline after each of the sub totals in my smartform.Like if theer are 7 items in the form and for each of the item there are 2-3 sub-items under it , I have calculated the sub totals for each of the item and to distingusih tjem separately i want to create a line after each of my sub totals for the items . How do i create the line after each of the items ?
    Thanks
    Aarav

    Hi Aarav
    Read this wiki.In the 8th step given there,GOTO the text element and give a ULINE there if needed.
    I think since this example is of tabular display you might not need a ULINE there.
    [https://wiki.sdn.sap.com/wiki/display/ABAP/SUBTOTALINSAP+SMARTFORMS]
    This defnitly will solve your problem.
    Regards
    Hareesh

  • Getting extra line after each record when opening a .txt file in excel

    Hi All,
    I have developed a program which downloads a file at application server.
    each record of file is 500 characters long & have CRLF at end.
    the file looks fine when opened in .txt format.
    however when i download it from application server to presentation server (using function "download to my computer"), & at presentation when i try to open it in excel format, it shows a blank line after every record.
    i don't want this blank line to appear if i download it & open it in excel.
    the file record is declared as char500 type.
    Please suggest how to deal with this.
    thanks in advance.
    Regards,
    Puja.

    Hi Puja,
    Check the file in the application server whether it has any gaps between the lines.
    Or else as you said if the file looks ok in .txt format, download the file in .txt and open the same file in excel (i.e. open with excel)
    Hope this sloves your problem.
    Regards,
    SB.

  • Add horizontal line after each record

    I have 10 records seperated by ID. I m using List in SSRS to show data on report. I need to add horizontal line after first record, then after second record till 10 th record. How do we add this line?
    Any help much appreciated.

    Hi SQL Insane,
    Per my understanding that you have add the tablix into the list and group on the "ID", now you want to add an horizontal line between each record which grouped by the ID like below, right?
    If so, please reference to the details information below:
    Select the entire rows and Right click to select the Insert row-Inside Group below to add an inside row group
    Select the new added inside row group and set properties as below to make sure there is only display the black solid line on the bottom just like to add an horizontal line:
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    If you have any feedback on our support, please click
    here.
    Vicky Liu
    TechNet Community Support

  • Okidata printer timeout prints extra page after each job

    After updating to Yosemite, I get the following problem.  When printing to my Okidata C331dn, everything seems fine, but about 25-30 seconds later, I get an extra page printed with the following:
    ERROR:  timeout
    OFFENDING COMMAND:  timeout
    STACK:
    This happens every time I print.  I am using the Mavericks drivers via USB (Oki has not updated their drivers, yet).
    Any ideas on how to stop this?  I am wasting a lot of paper!

    Hi,
    I have had the same problem with an Oki MC560 color NETWORK printer, after upgrading my Macbook to Yosemite.
    Now it seem solved after changing the printer network setting "IEEE802.1X" from "NO" to "YES"
    (I don't know why !).
    Now, after each printing, the printer remain "active" for some minutes, with "Data" led blinking as it should print something else,
    and then it goes in standby (without printing the extra page with timeout error).
    I hope this help you

  • C4780 still says "printer off line" after troubleshooting

    HP Photosmart C4780 Inkjet  printer
    Mac operating system
    "printer off' line"
    just moved and re-set up computer with same router....using printer wirelessly as before

    Well, you did not say WHICH Mac operating system, so let's try this: 
    Reset the printing system:
    - Sys Prefs, Print & Fax
    - Right (control) click in the rectangle listing your printers and select Reset Printing System.
    WARNING - this will delete ALL of your printers!
    - Select the plus sign to re-add it. Look for the printer, select it and wait until the "Add" button becomes available. Click it.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • Is it possible to print a label after each LPN during a PO receipt using MSCA?

    We have the buiness flow setup however the labels only print after all LPNs are received.  We would like each label to print when we go to Next Item.
    We are runing R12.1.3

    Sorry I forgot to put the locations of TS.xml
    Examples:
    Copying \\MDT04\DeploymentShare$\Control\WIN81ENTX64\TS.XML to X:\Deploy\Tools\X64
    Copying \\MDT04\DeploymentShare$\Control\WIN81ENTX64\TS.XML to C:\MININT\Tools\X64
    The one that is used when you are booted into the OS and have LTISuspend active is C:\MINIT\Tools\X64
    Is this the location you copied the TS.xml to?
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • Printer always print printing test page after each document

    i purchase HP 5020A ALL-IN-ONE PRINTER J510H
    after instalition compelet ..when i copy document ,always after copy the document print printer test page ?
    This question was solved.
    View Solution.

    The page is an alignment page.  Complete the alignment as shown on page 33 of the user manual here.  After the page is printed it needs to be loaded in the scanner bed and the Start Copy Black button pressed to somplete the alignment.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

  • Spooling a file adding spaces after each line

    Hi
    I am spooling a result of an sql in a csv file in linux os. But the file generates lot of blank lines after each row. How this can be eliminated while spooling
    Thanks in advance
    Sas

    Thanks a lot for your reply. Is there any way to supress the display of query result. I dont want to see the result. I want just the output file.
    Thanks
    Sas
    Edited by: SasDutta on Mar 24, 2010 4:20 PM

  • Line after item in table ?

    In my smartform , I have a table that prints line items...I need to add a line after each line item to seperate them ...how can i get that ?
    I tried adding a text element after the item ....but i cant get the line to span the entire table width ?

    Hi,
    There will be a place where you are populating the internal table in the smart form.
    I guess the internal table will be populated through a loop or through some select statement.
    IF it is through a loop then add the sentence which was suggested to add one blank line in between and if it is through a select then add a loop sentence
    Loop at itab
    append initial line
    end loop
    It all depends as to where you are populating your internal table
    this should work.
    prince.

  • Introduce blank line after every sub-total

    I want to add a blank line after each sub-total to improve readability. I thought CHAR(13) would do the trick. Do you have any ideas on how to accomplish this?
    Thanks,
    Dinesh.

    In Pivot Table, you can do duplicate layer on the column that you are subtotalling on. Then in the sum property of the duplicate column, specify label only. Hide the duplicate column.
    hth
    -Prakash

  • While printing from word appl. printer after each line puts in number of page,

    while printing from word appl. printer after each line puts in number of page, so I do not print 3 pages but 5 instead. What to do?

    What printer models is this intended for?  I assume it is aimed at the lower end inkjets, with the suggestion of loading 10-25 sheets of paper.
    Bob Headrick,  HP Expert
    I am not an employee of HP, I am a volunteer posting here on my own time.
    If your problem is solved please click the "Accept as Solution" button ------------V
    If my answer was helpful please click the "Thumbs Up" to say "Thank You"--V

Maybe you are looking for

  • Windows 8 phone bluetooth/WiFi printer support

    Do you have or will you have any apps for Windows 8 phone to allow printing to bluetooth or WiFi printers directly.  I have HP Officejet 100 Mobile Printer and HP officejet 6500A and can find no help either from Microsoft or Nokia currently to allow

  • Jrun struts oracle jdc - not able to open pages

    Hi, I am using JRun4 / JDK1.4.2 with struts. I use Oracle JDBC for RDBMS. My prob: I am able to open the index page and created a login validation which is done by JDBC. Here I have a bean to validate the login and set the attributes accordingly. Now

  • Labview 2013 executable works only on develoment machine?

    Hi all I created an executable so as to distribute my test software but it only runs on the development machine. I have successfully distributed my executables before with labview 2012 on target machines by simply creating the .exe in project explore

  • Prints with wrong font and drops letters. Preview shows font correctly.

    I'm having problems printing some pdfs in Leopard. The preview shows correctly but the resulting printout is in the wrong font and has missing letters. Specifically every time there are two 'f' in sequence they get left out. Printing the same files o

  • Can't import Outlook 2011 emails to Mac Mail

    Hi,  Recently I have shifted back to mac mail because of some personal reasons. Work is going great with mac mail, but the only thing I am worried about is the emails that are still in outlook 2011. Is there any wau to transfer all those emails from