Is this runtime polymorhpism?

For an assignment i'm doing we must use runtime polymorhpism (dynamic dispatch). I have three classes, Encryption (superclass), Caeser and Mixed (subclasses). Encryption is an abstract class with an abstract method called encrypt of which Caeser and Mixed have their own unique implemenation. In the main method I instantiate two objects like so:
Encryption caeser = new Caeser();
Encryption mixed = new Mixed();
and I invoke the encrpyt methods also within the main method like so, caeser.encrypt(), mixed.encrypt(). So is this still an example of runtime polymorphism even though my superclass is abstract?
Cheers

jag28 wrote:
For an assignment i'm doing we must use runtime polymorhpism (dynamic dispatch). I have three classes, Encryption (superclass), Caeser and Mixed (subclasses). Encryption is an abstract class with an abstract method called encrypt of which Caeser and Mixed have their own unique implemenation. In the main method I instantiate two objects like so:
Encryption caeser = new Caeser();
Encryption mixed = new Mixed();
and I invoke the encrpyt methods also within the main method like so, caeser.encrypt(), mixed.encrypt(). So is this still an example of runtime polymorphism even though my superclass is abstract?Yes this is an example of runtime polymorphism because the decision of which class to call with the method is decided during runtime.
Mel

Similar Messages

  • Why Am I Getting This Runtime, Runtime Asked To Terminate In An Unusal Way, Error?

    Dear Forum,
    When trying to run Adobe Acrobat Standard 9 I got this message:
    I uninstalled/reinstalled your software. I haven't had the chance to use the software until tonight.
    While working on a home project, I tried to open a .pdf file from another website, I received this message:
    When I clicked OK and tried to start Acrobat I received the original message:
    I clicked OK and received this error message:
    Before I uninstall is there a fix/update available?
    Any help will be greatly appreciated.
    Thanks in advance.
    Respectfully,
    Robert B. Orris
    Message was edited by: Robert Orris

    Hi Rave,
    I followed your instruction to the "T" and after trying to apply the update I get an error message that says, in short, Unable to apply update . . . Software not installed or wrong patch used. I have Adobe Acrobat Standard 9. I downloaded AcrobatUpd955_all_incr.msp.
    After installing the software and started up I received the same errors I posted on "Acrobat Installation & Update Issues".
    I have to be at the hospital tomorrow morning at 5am for my back surgery. I will be in the hospital for a few days. Please respond and I will find it when I can sit at the computer again.
    Thanks again.
    Respectfully,
    Bob
    I am a thorn in Your crown; But You love me anyway;  I am the sweat from Your brow;  But You love me anyway;  I am the nail in Your wrist;  But You love me anyway;  I am Judas’ kiss;  But You love me anyway  ("You Love Me Anyway" by "Sidewalk Prophets")
    God decided in advance to adopt us into his own family by bringing us to himself through Jesus Christ. This is what he wanted to do, and it gave him great pleasure.
    Ephesians 1:5
    From: Rave <[email protected]>
    To: Robert Orris <[email protected]>
    Sent: Monday, June 2, 2014 9:25 AM
    Subject:  Why Am I Getting This Runtime, Runtime Asked To Terminate In An Unusal Way, Error?
    Why Am I Getting This Runtime, Runtime Asked To Terminate In An Unusal Way, Error?  created by Rave in Acrobat Installation & Update Issues - View the full discussion  
    Hi Robert,
    Please let me know the OS you are using.
    The latest patch for Acrobat 9 is version 9.5.5. Make sure you have updated it to the latest patch and then try.
    Please use the Acrobat Cleaner Tool ( Download Adobe Reader and Acrobat Cleaner Tool - Adobe Labs ) to uninstall the software and then reinstall and check.
    You might also want to try the following before reinstaling the software :
    Disable all Non-Microsoft Startup Services. (Ref : http://helpx.adobe.com/x-productkb/global/disable-startup-items-services-windows.html)
    Disable all the Antivirus softwares like CA, Norton,Mc Afee etc. temporarily from the computer.
    Regards,
    Rave
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6427365#6427365
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: 
    To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link. 
    Start a new discussion in Acrobat Installation & Update Issues by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • How Do I Fix This Runtime Shared Library Preloading Error?

    Hello,
    I just finished up my site, and this is the only thing holding me back from publishing it. Whenever I "Test" my site, I get this error: " Your content will not stream. Runtime Shared Library (RSL) preloading will require all of your content to download before the first frame will play.
    To prevent this you can change the Runtime Shared Library Library Settings, in the Advanced ActionScript 3.0 Settings dialog which can be raised from the Publish Settings dialog.
    The Runtime Shared Libraries being preloaded are:
    textlayout_1.0.0.595.swz for TLF Text"
    Does anyone know how to correct this error? If you do, could you please walk me through it step-by-step. I am still very new to "Flash Professional (CS5)" & "ActionScript (3.0)"

    Reference error is because the default linkage for textLayout.swc is Runtime Shared Library (RSL) with preload swf option so the reference will always be “RSLPreloader” if TLF is used.
    There are 2 options that we can avoid the reference error:
    1. Change default linkage to “Merged to code” which will add around 150KB to child swf file size.
    2. Change preloader method to “Custom preloader loop”, move all contents and scripts to frame 2. And finally, in the Advance ActionScript 3.0 Settings, export classes in frame to 2.

  • How Do I Fix This Runtime Library Error?

    Hello,
    I just finished up my site, and this is the only thing holding me back from publishing it. Whenever I "Test" my site, I get this error: " Your content will not stream. Runtime Shared Library (RSL) preloading will require all of your content to download before the first frame will play.
    To prevent this you can change the Runtime Shared Library Library Settings, in the Advanced ActionScript 3.0 Settings dialog which can be raised from the Publish Settings dialog.
    The Runtime Shared Libraries being preloaded are:
    textlayout_1.0.0.595.swz for TLF Text"
    Does anyone know how to correct this error? If you do, could you please walk me through it step-by-step. I am still very new to "Flash Professional (CS5)" & "ActionScript (3.0)"
    Above is the exact error message I receive.

    given the information provided in this forum, do you really think someone could answer that question?

  • How do I fix this runtime Error?

    Server Error in '/' Application.
    Runtime Error
    Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
    Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
    <!-- Web.Config Configuration File -->
    <configuration>
    <system.web>
    <customErrors mode="Off"/>
    </system.web>
    </configuration>
    Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
    <!-- Web.Config Configuration File -->
    <configuration>
    <system.web>
    <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
    </configuration>
    I am running Firefox 28.0 on Windows 8.1

    That is a problem on the web server that you try to visit.<br />
    You can't do anything about it unless you are sending corrupted data like cookies or a link that doesn't exist.
    The site might be taken down at this moment and can't be reached.

  • Noob question, how to avoid this runtime error,please help..

    Im new to java. Im using a JOptionPane in getting the user an input/a number, which is in String,. and to use it, im converting it by Integer.parseInt. When I run it everything seems ok, but whenever i inputted other data types other than integer(e.g char), i get a runtime error message "exception in main thread java.lang.NumberFormatException blah blah.....,. Is theres a way or a method or something that i can filter the users input when they type a character or when they inputted nothing that will not resulted to a runtime error, instead, an error message box will said that it is an invalid input. thanks in advance

    Ah, well, after an evening of rest and reflection, I have to conclude that we are all partially correct. I never meant to imply that NumberFormatException should not be caught. I have had to repair too many classes in which just-in-case or programming-by-exception was a rule, rather than a valuable technique for handling exceptional or error situations.
    As far as this example, I was not attempting to write a parser, or even start one. We are talking about a very simple situation ... determine if a String represents an integer. My example was overly simple, too. As pointed out, too simple. *\d+* would have eliminated empty strings, and with a few relatively minor changes, could handle all legal integers easily, including '-' and ',' characters, while excluding floating point and other invalid inputs. I did mention that regexes were an advanced technique. A Scanner could be used to test for the existence of an integer in a string. None of these rise to the level of parsing, IMO, but, as I have frequently said in these fora, the arguments of the mages are infinite. Of course, that implies that I consider myself a mage, which is not actually the truth.
    In any case, as pointed out, this is an example where catching a runtime exception is probably a good idea, as long as we don't give the OP the idea that this is the only technique, or that code can be written to ignore the causes of exceptional situations, because we can always handle them in the catch block. I have seen way too much of this to be comfortable with even the suggestion of this.
    I come here to learn. Sometimes, I learn interesting, complex things. Sometimes, I learn interesting, simple things.
    Sincerely, thanks for helping me to learn.
    ? {?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • What is causing this Runtime Error!

    I have been using Adobe Reader for years and had 9.0 loaded on this laptop.  I do lots of .pdf files and spreadsheets. Two weeks ago I allowed an update for Adobe and ever since then I get a Runtime Error! every time I try to open one of my saved .pdf files or even the one that I just formated and saved, it won't reopen.  I have VISTA and prior to this update, I had no problems with Reader at all. Shortly after clicking on the .pdf file I get this window -
    Microsoft Visual C++ Runtime Library
    Runtime Error!
    Program:C:\Program Files(x86)\Adobe\Reader9.0\Reader\AcroRd32.exe
    This application has requested the Runtime to terminate it in an unusual way.
    Please contact the application's support team for more information.
    I have tried to research the Adobe site for help and even contacted Adobe by phone with no success.  I've called twice and been put on hold and tonight after 28 minutes I finally hung up. I went into my Control Panel and uninstalled Adobe Reader 9.0 and downloaded & installed Reader 9.3 and still have the same problem.  I can save my files on a thumb drive and open any .pdf file on any other computer that has Reader.  What is the problem with this laptop since that update two weeks ago?  This is causing me lots of lost work and duplication.
    Thanks for any input on how to correct this problem. I currently have Reader 9.3 loaded.

    There's something similar in OSS note 1002788. Is it relevant to your system?

  • From where this runtime is getting populated

    Suppose you create a report and run it. After running the report, you click administration, then session, you will find the generated physical query.
    +++User_ID:20cc0000:20cc0001:----2011/06/22 21:08:43
    i would like to know where this timestamp (2011/06/22) is getting populated.
    Could anyone throw some light on this?

    Hi,
    What do you mean by "where is getting populated"?. AS you mention is getting populated right there, under the Manage Session screen. It takes the server date and time.

  • Can anyone solve this runtime exception

    Hi dudes
    I am using iText pdf converter(third party API tool) in my office. When i tried to create a dynamic pdf file, generates some runtime exceptions. It is compiling with out any problem I had run the same code in another system at my home without any problem.
    I am herewith attaching the exceptions. Please give suggestion to rectify the problem
    Jp
    Program
    import com.lowagie.text.*;
    import com.lowagie.text.pdf.*;
    import java.io.*;
    public class test{
    public static void main(String args[])throws Exception{
    Document d=new Document();
    PdfWriter.getInstance (d, new FileOutputStream ("sample.pdf"));
    d.open ();
    Paragraph p = new Paragraph ("Some sample Text");
    d.add (p);
    d.close ();
    Runtime Exception
    Exception in thread "main" java.lang.InternalError: Unexpected exception while defining class com.lowagie.text.pdf.PdfPrinterGraphics2D: java.lang.ClassNotFoundException: java.awt.print.PrinterGraphics
    at 0x40268e17: java.lang.Throwable.Throwable(java.lang.String) (/usr/lib/./libgcj.so.3)
    at 0x4025bc8e: java.lang.Error.Error(java.lang.String) (/usr/lib/./libgcj.so.3)
    at 0x402691fa: java.lang.VirtualMachineError.VirtualMachineError(java.lang.String) (/usr/lib/./libgcj.so.3)
    at 0x4025d62e: java.lang.InternalError.InternalError(java.lang.String) (/usr/lib/./libgcj.so.3)
    at 0x4025ac2f: java.lang.ClassLoader.defineClass(java.lang.String, byte[], int, int, java.security.ProtectionD
    omain) (/usr/lib/./libgcj.so.3)
    at 0x4025aa13: java.lang.ClassLoader.defineClass(java.lang.String, byte[], int, int) (/usr/lib/./libgcj.so.3)a
    t 0x402f1f2e: java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/./libgcj.so.3)
    at 0x40248197: gnu.gcj.runtime.VMClassLoader.findClass(java.lang.String) (/usr/lib/./libgcj.so.3)
    at 0x4025a904: java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/./libgcj.so.3)
    at 0x4024889c: JvFindClass(_Jv_Utf8Const, java.lang.ClassLoader) (/usr/lib/./libgcj.so.3)
    at 0x40244cdd: java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/./libgcj.so
    .3)
    at 0x4023b4cf: JvBytecodeVerifier.verify_instructions_0() (/usr/lib/./libgcj.so.3)
    at 0x40231857: JvVerifyMethod(_Jv_InterpMethod) (/usr/lib/./libgcj.so.3)
    at 0x40229ae4: JvPrepareClass(java.lang.Class) (/usr/lib/./libgcj.so.3)
    at 0x40248028: java.lang.ClassLoader.linkClass0(java.lang.Class) (/usr/lib/./libgcj.so.3)
    at 0x4025acb3: java.lang.ClassLoader.resolveClass0(java.lang.Class) (/usr/lib/./libgcj.so.3)
    at 0x4024646c: java.lang.Class.initializeClass() (/usr/lib/./libgcj.so.3)
    at 0x40230912: JvInterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x40230ff4: JvInterpMethod.run(ffi_cif, void, ffi_raw, JvInterpMethodInvocation) (/usr/lib/./libgcj.so.
    3)
    at 0x4022e504: JvInterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/usr/lib/./libgcj.so.3)
    at 0x4038305c: ?? (??:0)
    at 0x403831e7: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
    at 0x403831a7: ffi_raw_call (/usr/lib/./libgcj.so.3)
    at 0x402306e8: JvInterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x40230ff4: JvInterpMethod.run(ffi_cif, void, ffi_raw, JvInterpMethodInvocation) (/usr/lib/./libgcj.so.
    3)at 0x403831e7: ffi_call_SYSV (/usr/lib/./libgcj.so.3)
    at 0x403831a7: ffi_raw_call (/usr/lib/./libgcj.so.3)
    at 0x402306e8: JvInterpMethod.continue1(_Jv_InterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x40230ff4: JvInterpMethod.run(ffi_cif, void, ffi_raw, JvInterpMethodInvocation) (/usr/lib/./libgcj.so.3)
    at 0x4022e504: JvInterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/usr/lib/./libgcj.so.3)
    at 0x4038305c: ?? (??:0)
    at 0x40242dd8: gnu.gcj.runtime.FirstThread.call_main() (/usr/lib/./libgcj.so.3)
    at 0x402ad02d: gnu.gcj.runtime.FirstThread.run() (/usr/lib/./libgcj.so.3)
    at 0x4024fc4c: JvThreadRun(java.lang.Thread) (/usr/lib/./libgcj.so.3)
    at 0x4021c8ac: JvRunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/./libgcj.so.3)
    at 0x08048910: ?? (??:0)
    at 0x42015574: __libc_start_main (/lib/tls/libc.so.6)
    at 0x080486c1: ?? (??:0)
    at 0x4022e504: JvInterpMethod.run_normal(ffi_cif, void, ffi_raw, void) (/usr/lib/./libgcj.so.3)
    at 0x4038305c: ?? (??:0)
    ----------------------------------------------------

    What Java Virtual Machine are you using? Is it Sun's JVM or some other? Which JRE version are you using?
    Mike

  • Unable to correct this runtime error

    hi i am unable to correct this STACKOVERFLOW ERROR
    plz help
    i m learning to make small java programs.
    here's the code
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.io.*;
    import javax.swing.*;
         class cwdm1 extends JFrame // implements ActionListener
              public void show()
                             Container cp = getContentPane();
                             cp.setLayout(new FlowLayout());
                             setLocation(400,200);
                             JButton submit = new JButton("submit");
                             JLabel lusername = new JLabel("UserName");
                             JLabel lpassword = new JLabel("Password");
                             JTextField tusername = new JTextField(10);
                             JPasswordField ppassword = new JPasswordField('#');
                             cwdm1 myframe1 = new cwdm1();
                             myframe1.setSize(300,300);
                             myframe1.setVisible(true);
                             cp.add(submit);
                             cp.add(lusername);
                             cp.add(lpassword);
                             cp.add(tusername);
                             cp.add(ppassword);
                             submit.setBounds(80,135,100,25);
                             lusername.setBounds(20,70,100,25);
                             lpassword.setBounds(20,100,100,25);
                             tusername.setBounds(150,70,100,25);
                             ppassword.setBounds(150,100,100,25);
              public class cwdmmain
                        public static void main(String args[])
                                  cwdm1 obj1 = new cwdm1();
                                  obj1.show();
              }

    Make this modfication:
    public void show()
    (new IOException()).printStackTrace();to see:
    java.io.IOException
         at cwdm1.show(cwdm1.java:15)
         at cwdm1.main(cwdm1.java:48)
    java.io.IOException
         at cwdm1.show(cwdm1.java:15)
         at java.awt.Component.show(Unknown Source)
         at java.awt.Component.setVisible(Unknown Source)
         at cwdm1.show(cwdm1.java:31)
         at cwdm1.main(cwdm1.java:48)
    java.io.IOException
         at cwdm1.show(cwdm1.java:15)
         at java.awt.Component.show(Unknown Source)
         at java.awt.Component.setVisible(Unknown Source)
         at cwdm1.show(cwdm1.java:31)
         at java.awt.Component.show(Unknown Source)
         at java.awt.Component.setVisible(Unknown Source)
         at cwdm1.show(cwdm1.java:31)
         at cwdm1.main(cwdm1.java:48)
    ... and so on unitl the overflow

  • I just did an itunes update on my windows vista 64 and have been getting a runtime error eversense.  Unstalled everything apple per microsoft forum discussions and solved the problem.  When is apple going to update this problem for itunes?

    I just recently did an itunes update on my Windows Vista 64 and have been getting a runtime C++ R0634 error ever since. Per microsoft forum discussions, I have removed everything apple on my computer to get this runtime error to stop.  When I tried to remove and reinstall itunes, I get an error message during installation and to try again. Has just become a cycle.  Apple, are you working on this? 

    I have exactly the same problem.  Got update notice from Apple for iTunes and getting the C++ runtime error R0634 ever since.  I have no clue how to fix it....meantime, I can't even pull up Outlook to check email.  HELP!!
    ksware

  • I can't download the itunes this is what appear :runtime error R6034 an application has made an attempt to load the C runtime library,please contact the application support team for more information

    I can't download the itunes on my PC , have it before but now appear a note like this:
    RUNTIME ERROR
    PROGRAM C;/PROGRAM FILES (X86)/ ITUNES/ITUNES.EXE
    R6034
    AN APPLICATION HAS MADE AN ATTEMPT TO LOAD THE C RUNTIME LIBRARY INCORRECTLY
    PLEASE CONTACT THE APPLICATION SUPPORT TEAM FOR MORE INFORMATION
    WHAT I NEED TO DO?
    THANK YOU
    RODRIGO

    Click here and follow the instructions. You may need to completely remove and reinstall iTunes and all related components, or run the process multiple times; this won't normally affect its library, but that should be backed up anyway.
    (99467)

  • Runtime error in enhancement spot-' mereq_topline does  not exists.'

    Hi all,
    I have implemented an implicit enhancement spot in ME53n.
    When i applied break point in enhancement spot and control goes to ebhancement spot in debugging mode, i got purchse requisition number in mereq_topline.
    When i tried to use this structure value in code i get runtime error-
    ' mereq_topline does  not exists.'
    Can you please guide how to resolve  this runtime error.
    thanks.
    Edited by: Sanjay_lnt on Sep 20, 2010 8:52 AM

    Sanjay,
    try to delete the enhancement and recreate it
    Thanks
    Bala Duvvuri

  • Runtime Error in Goods Receipt

    Dear Experts,
    The runtime error while posting Goods Receipt.
    The Current application triggered a termination with short dump.
    Error analysis
    Shirt text of Error Message
    Document number 1000 (Company Code) 5000000000 2008 was already assigned.
    Long text for Error message:
    Diagnosis
    Document number 5000000000 in company code 1000 and Fiscal year 2008 has already
    been assigned.
    System Response -
    Termination of Processing
    Procedure
    Check document number range 50 in company code 1000 and fiscal year 2008 and correct the number range status. 
    Please guide me on this runtime error while Goods receipt.
    Thanks in Advance

    This means that the system tried to create a document with the number from the number range status but since the document with the same number was already in the system the system could not proceed overwriting hence resulted in a dump.
    How to over come. Give a number range or give a current status to the number range for which documents does not exist in the system.
    Edited by: Anand Patel on Oct 7, 2008 1:12 PM

  • Runtime Error in BW, in RSA1 transaction

    Hello Boss,
    Iam getting runtime error while activating the info object in RSA1 transaction.
      I got OSS notes also from our basis consultant, plz give suggestion how to rectify this one.
      Even while executing the program iam getting runtime error.
      In this OSS notes they mentioned while u activating DSO u get this runtime error & solutions r given. iam not activating any DSO, activating info object. plz give ur suggestion.

    Hi,
            check in ST22 what exactly is message.. Ask basis to check server space and bg process.
    Abhi

Maybe you are looking for

  • Can't save to server

    In my work environment we save and keep all files on our servers (windows). When i try to save a PS file on the server, I get a promt telling me " Could not save because the file name was not valid". The file name is test.jpg - no strange characters

  • Problems with tns/listener

    Hi, i have a question regarding a problem i am experiencing in my development oracle env. i have 2 instances - oracle 11.2.01 and 11.2.0.3.(windows 2008 enterprise) We were able to connect to both instances without any issues. Few days back we starte

  • Keynote slideshow glitches in iDVD

    When I import a slide presentation from Keynote I want it to be manually advanced. I have all slides set to "on click." I have tried to export as an interactive QT as well as directly into iDVD. Both ways - once the show is imported and I play the sh

  • Open form in a stacked canvas

    Hello all, I have a content canvas which has a stacked canvas on it. the content canvas i want to use as background and there will be buttons to navigate through different forms and have those forms called on the stacked canvas. Can u please tell me

  • No message for message#

    This is the error message I have got in EAS when I try to look at the DB statistics for an ASO db.Any idea how I oculd fix it ?Thank youPierre