answersLogoWhite

0


Best Answer

For example, given a base class of "Car," polymorphism enables the programmer to define different "StartEngine" methods for any number of derived classes. The "StartEngine" method of a derived class named "DieselCar" may be completely different from the method with the same name in the base class.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How are data and method organised in object-oriented program Illustrate the same for car object?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How to write program for secant method in mathematica?

How to write a program for secant method by mathematica


The main method of a program has?

The Java main method of a program is the place where the program execution begins. A main method would look like below public static void main(String[] args){ }


Differences between declaring a method and calling a method?

Declaring a method is when you code for what the method will perform. When you call a method, you are using the method you have written in another part of the program, (or inside the method if it is recursive).


What happens if the static modifier is removed from the signature of the main program in java?

Actually speaking nothing major happens. That method would become just another method in the class. You cannot use that as the method to begin the program execution in your class. Your class will not be a standalone java program and you cannot execute it like you did before using the public static void main() method.


How to write java program without using main method?

Java program without mainWe need a main method for executing a program.But YES we can write a program without using main() method.TRICK 1 of 2 :: while writing applets in java we don't use main... we use init() method instead.TRICK 2 of 2 :: using 'static' we can write a program whic will execute successfully and output the desired message on screen. Here it is :: class Mohit{ static { System.out.println("This java program has run without the main method"); System.exit(0); } } -->save the program as Mohit.java to compile::javac Mohit.java (in command prompt) to run ::java Mohit(command prompt) output will be ::This java program has run without the main methodWhoa!!!!! we are done.;)

Related questions

How does the elephant poem illustrate the importance of observation in the scientific method?

How does this poem illustrate the importance of observation in the scientific method


What are the various methods of valuation of shares discribe and illustrate net asset method of valuing shares?

They include; Intrinsic Value Method, Yield Method and Net Asset Method.


Can main method be overloaded illustrate with example program?

Yes, you can very well overload the main method but, the main method that would get invoked by the JVM when you try to run this class would be the main method that has the below signature: public static void main(String[] args) { ... } All other main methods would be accepted by the Compiler but only the above method would get called when you run the class


How to write program for secant method in mathematica?

How to write a program for secant method by mathematica


Which operational definition does Schaefer use in his research example to illustrate the scientific method?

your a black person


The main method of a program has?

The Java main method of a program is the place where the program execution begins. A main method would look like below public static void main(String[] args){ }


Write about the method of undetermined coefficients method of variation of parameters Discuss compare the advantages disadvantages of each method Illustrate your findings with examples?

o bhen k lodo madarchod sale hm


How do you describe scientific method and illustrate how you would use it to solve a problem?

Scientific method is described as a scientific approach to a problem. To solve a problem you must first find the problem, access it, hypothesize a solution, illustrate your solution, try the solution, and then finally try it. If this does not work start over.


How do you illustrate one million?

If by illustrate, you meant demonstrate by showing a real life example, then here is one method: Start counting each second right now and keep counting for about eleven and a half days to get to a million.


Write about the method of undetermined coefficients and method of variation of parameters Discuss and compare the advantages and disadvantages of each method Illustrate your findings with examples?

As long as you give me the marks and you take none yourself I may consider doing such writing.


Differences between declaring a method and calling a method?

Declaring a method is when you code for what the method will perform. When you call a method, you are using the method you have written in another part of the program, (or inside the method if it is recursive).


How do you illustrate something without drawing a picture?

You could use (stock or personally taken) photos. This is a common method used in business.