:: 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                      
Categories >> Software >> Scripts >> JavaScript


 PHP interview questions  PHP Interview Questions (658)
 ASP interview questions  ASP Interview Questions (251)
 CGI Perl interview questions  CGI Perl Interview Questions (76)
 JavaScript interview questions  JavaScript Interview Questions (174)
 VB Script interview questions  VB Script Interview Questions (342)
 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
	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
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
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

No Answer is Posted For this Question

Be the First to Post Answer

Other JavaScript Interview Questions
  Question Asked @ Answers
How do you assign object properties? Satyam 3
Can i create an login account with javascript ,without using database ? TCS 6
What boolean operators does JavaScript support? Satyam 5
How to go next field without filling the text? Which function should we use?   4
What looping structures are there in JavaScript? Satyam 1
what is the need of javascript in the internet   1
what is eval pls breif information send me   1
How to add a combo box dynamically at run time in Java script?   5
What is negative infinity? Satyam 2
what is inheritence Wipro 6
Write a Program of Simple Calculator in JavaScript using HTML.   1
what is the source code for sendRedirect method()java Servlet program?   1
For more JavaScript Interview Questions Click Here 

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