ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Scripts >> JavaScript
 
 


 

 
 PHP interview questions  PHP Interview Questions (659)
 ASP interview questions  ASP Interview Questions (252)
 CGI Perl interview questions  CGI Perl Interview Questions (76)
 JavaScript interview questions  JavaScript Interview Questions (176)
 VB Script interview questions  VB Script Interview Questions (343)
 JSP interview questions  JSP Interview Questions (100)
 Shell Script interview questions  Shell Script Interview Questions (158)
 Python interview questions  Python Interview Questions (5)
 Tcl interview questions  Tcl Interview Questions (19)
 Awk interview questions  Awk Interview Questions (6)
 AJAX interview questions  AJAX Interview Questions (24)
 Ruby on Rails interview questions  Ruby on Rails Interview Questions (21)
 Scripts AllOther interview questions  Scripts AllOther Interview Questions (48)
Define an interface MilitaryPower that has the following
properties:
	The interface has two public static final variables which
are the finite x and y coordinate (i.e. the distance of the
objects should not exceed these values. These values set to 100.
	The interface has a method move that moves the military
power objects to the target value. The method will be
implemented by the other classes. The return type should be
void.
B) Define an enum class Direction which contains the
directions (EAST, WEST, SOUTH, NORTH).
C) Define a concrete class Tank that implements
MilitaryPower, has the following properties:
	XCoordinate (Integer), YCoordinate (Integer) are the
instance variables for this class.
	All instance variables should be private.
	Write a parametered constructor that takes two parameters
assigning with the instance variables.
	Write a set and get method each of the instance variables.
	Write a method move that takes two parameters. One of them
is distance which type is integer. Another is direction
which type Direction. The method should to the following:
o	If the direction is EAST, set the x-coordinate with adding
distance.
o	If the direction is WEST, set the x-coordinate and
subtract distance from x-coordinate.
o	If the direction is SOUTH, set the y-coordinate with
adding distance.
o	If the direction is NORTH, set the y-coordinate and
subtract distance from x-coordinate.
	Write a method toString to display the tank coordinates.

D) Define an array holding 10 MilitaryPower objects, all of
them being a Tank. Then display each of the object
information on the screen. (display its movements  and
coordinates). 


No Answer is Posted For this Question

Be the First to Post Answer

 
 
 
Other JavaScript Interview Questions
 
  Question Asked @ Answers
 
if the two text boxes are there i want assign the vales like 2&3 and if i select button means i want find the sum.this is client side scripting in javascript Infosys 7
In javascript chained select menus are available.first select menu is worked and others are disabled.when we select any one option then the next select menu will worked having option releated to selcted in first select menu.How it possible? what is the coading of this programme?   1
why is java platform indipedence HCL 2
how to post the form without submit button with help of javascript   2
program showing string concatenation?   4
Can any one tell me about s_objectID used for the anchor tag why it is used, what for and how to use it properly. with an example...please please......   1
can any one tell me the syllebus for java certification   2
Advantages & Disadvavtages of Java Script? Advantages & Disadvantages of CGI Scripting? Structure of Java Script? Commands of Java Script? HTML Basic Reviews?   2
What is the difference between programing language and scripting language.? Reliance 3
What is the source code for include() & forwrd() method servlet program?   1
write a program to generte a harmonic series 1+1/2+1/3+1/4+1/5 upto 15 terms.   1
How do you convert numbers between different bases in JavaScript? Satyam 4
 
For more JavaScript Interview Questions Click Here 
         


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com