Description In this project, youwill create a graphical simulation of an aerial dogfight game. As a minimum, your completed project shallcontain: a movable friendlyfighter aircraft which shall defend itself against a squadron of enemy fightersusing weapons which can be fired by the user using the keyboard.a number of enemyfighters which shall attempt to destroy your friendly fighter. Enemy fighters shall destroy your friendlyfighter by either crashing into it or optionally firing projectiles to hit it.The user is theperson playing the game and will be playing the role of the friendly fighter.The simulation will continue until all of the enemy aircraft have beendestroyed, your friendly aircraft has been destroyed, or the user decides toquit. The user will’communicate’ with the friendly fighter by entering commands via thekeyboard. These commands will move thedefender up and down on the display and fire the projectiles. When fired, the projectiles shall provide adisplay of the projectile’s path traveled and shall destroy any target theyhit. The user will determine the numberof enemy fighters via a dialog box.Graphics Support You will use theStdDraw package introduced below to provide the graphical elements of yoursimulation. This software is courtesy of Robert Sedgewick and Kevin Wayne fromPrinceton University’s Computer Science Department. See the followingdescription for details on its use, or you can find information on thePrinceton Intro to CS website. StdDraw is used toproduce graphical output. In order touse the class you must first add it to your project. The easiest way to do this is to downloadStdDraw.java and save it to the src directory of your project.StdDraw is similar tothe Math class in that you can’t create a StdDraw object. Everything you need is accessed via staticmethods and static variables. Documentation for the class can be found here, orat http://www.cs.princeton.edu/introcs/15inout/ under the Standard Drawingheading along with multiple examples. Some of the methods you’ll use in this project are: voidsetXscale(doublex0, x1) – used to set the dimensions for the display area. For example setXscale(-20, 20) creates adisplay area where x ranges from -20 to 20. voidsetYscale(doubley0, y1) – same as above, except it sets the y dimensions. voidsetPenColor(Colorc) – set the color that will be drawn. The colors can be accessed as static variables in StdDraw. Ex: setPenColor(StdDraw.BLUE). voidfilledCircle(doublex, double y, double r) – draws a solid circle with the center at position x, yand a radius of r. void show(int t) –shows the drawing and pauses for t milliseconds. Additional methodsfrom the StdDraw package may be needed and can be discovered by reading theStdDraw documentation. Projectspecifications Your project mustinclude the following classes which are derived from class AerialObject (whichyou also shall provide): an EnemyAircraft class, a FriendlyAircraft class, aProjectile class. In addition, shouldyou choose to add any moveable GroundObjects to your project (for extracredit), you should include an additional DogfightObject class from whichclasses AerialObject and GroundObject inherit. In addition, your project shall include a class Pos to define thecoordinates of your objects in the x-y coordinate space, as well as a classBattleSpace to hold all of the objects in your BattleSpace (EnemyAircraft,FriendlyAircraft, Projectile). It shallalso include an execution class AerialDogfight used to control the execution ofyour simulation. You will need to import the StdDraw.java code into yourproject so you will actually have at least nine classes (see me if you have analternate architecture in mind) in your project. Figure 1 belowprovides a partial UML Class Diagram for the above recommendedarchitecture. You should provideadditional classes as well as addition attributes and methods for the existingclasses as you feel necessary to meet the project specifications. Figure 1: Project 1“TopGun” UML Class Diagra DogfightObject Class Class DogfightObjectis a top-level class to contain all of the attributes and methods which arecommon to the other entity classes in the simulation. It will contain commonly used constants aswell as attributes and methods common to both aerial and ground objects used inthe simulation. AerialObject ClassClass AerialObject isan abstract class used as the base class for creating classes EnemyAircraft,FriendlyAircraft, and Projectile. Itwill also be used for creating a reference object that will be used to invokepolymorphic behavior of these classes when drawing an instance of these classesin the window. FriendlyAircraft ClassWe’re going to add aFriendlyAircraft to our dogfight to use in holding off the enemy (or to atleast zap a few of them in the process!) Our FriendlyAircraft will be a located along the left edge of the screenand shall be controlled using the “U” and “N” keys, indicating up and downrespectfully, to move it along the left side of the window and the ‘F’ key tofire its Projectiles. Use StdDraw todraw it using an appropriately sized icon. Movement will be simulated by the right-to-left movement of the enemyaircraft across the screen. Each timethe fire key is pressed, your FriendlyAircraft shall fire its Projectileleaving a trail that shall travel directly to the right from its position,disappearing when it reaches the right side of the window (hopefully hitting anEnemyAircraft in the process! EnemyAircraft ClassThis class should bedeveloped using the Figure 1 UML diagram as a basis. As a minimum, you shall display yourEnemyAircraft using an appropriately sized icon. The y location shall berandomly generated before the EnemyAircraft object is instantiated and the xlocation shall be set to the right of the display. All three of these values should be passed tothe constructor. Use StdDraw to drawappropriately sized icons. EnemyAircraftshall be removed from the display if hit by our FriendlyAircraft’sProjectiles. Your life will be easier ifyou use class Pos to represent the position of the objects in your BattleSpaceand make all your x and y’s that designate the location doubles rather thanints. Your toString method should returnthe location of the EnemyAircraft and obviously all EnemyAircraft should beinstantiated as alive. YourEnemyAircraft should start at the right side of the Window and move in asemi-random direction while moving from the right to the left side of yourscreen- changing direction each time it reaches the top and bottom boundariesof the BattleSpace (or otherwise decides it’s bored with the current directionit’s heading!). Your directions areeither directly left, diagonally down-left, or up-left. Optionally, the EnemyAircraft may fire theirown missiles at the FriendlyAircraft, destroying it and terminating the game ifthe FriendlyAircraft is hit. TheFriendlyAircraft may also be destroyed if an EnemyAircraft runs into it. Projectile ClassThe Projectile classshall be used to create the track of projectiles fired from theFriendlyAircraft’s weapons each time the fire key is pressed. Projectiles shall originate at theFriendlyAircraft’s position and travel to the right until they either hit aninvading EnemyAircraft (thereby destroying it) or travel beyond the limits ofthe viewer’s window. Optionally,Projectiles may also be fired from the Enemy aircraft, either automatically orby the designer’s choice of key depression or mouse click. If the Enemy aircraft fires a projectile, itshall travel in the same direction as the EnemyAircraft’s heading and it shalldestroy any object (friend or foe) to which it contacts. BattleSpace ClassI also defined a classBattleSpace to hold all of the various components for my simulation(EnemyAircraft, FriendlyAircraft, Projectile). It includes methods for adding EnemyAircraft and a FriendlyAircraft tothe simulation as well for firing Projectiles when the user hits the “f”key. A draw( ) method is also providedto display these items in the window. Tokeep track whether we’re winning the battle against the invading horde, we’llwant to keep a count of and display the number of EnemyAircraft we’vedestroyed. AerialDogfight ClassFinally, you’ll wantto create an execution class that controls the whole simulation. Class AerialDogfight contains the methodsused to control the simulation operation. Remember, the main method of your execution class should be very short(2-3 lines maximum); it will basically rely on the run() method and its helpersto control the execution. Grading The project will begraded using the following guidelines Documentation (10%):All source files, except StdDraw.java, must be documented using JavaDoc. Youmust submit completed UML diagrams for all three classes.Encapsulation (10%):You are expected to use what we’ve learned with respect to proper use of thepublic and private access modifier to control access to the data members andhide the underlying implementation as much as possible. You must also useaccessor/get and mutator/set methods to access the private data.Style Guide (5%):Makesure you are familiar with the style guide in terms of formatting your code andproper use of variable and class names. See the course web page for a link tothis guide.Meeting ProjectSpecifications (75%):Your project should meet the requirements as laid out inthis project description and expanded on below.1. Project must use inheritance.2. Project must use polymorphism.3. Project must use Abstract classes.4. Project must use ArrayLists to contain AerialObjectand Ground objects.5. Project must iterate through elementscontained in ArrayListcontainer using for each loops.6. Other requirement as called out in theabove Project specifications. Other Requirments (+1 pt.) Put a counterin the loop in the simulate method and when all targets have been destroyedgive the user his score via a JOptionPane dialog box. The score should be the number of targets theFriendlyAircraft destroyed.(+3 pts.) Stop thetargets from ever overlapping each other.(+5 pts.) Allow theEnemyAircraft to fire their own Projectiles, ending the simulation when one oftheir own Projectiles destroys the FriendlyAircraft. The Projectile’s direction of motion shall bedetermined by the aircraft’s heading at the time the Projectile is fired.(+3 pts.) Inconjunction with 3 above, EnemyAircraft Projectiles shall destroy anyEnemyAircraft or FriendlyAircraft they hit.(+5 pts.) Allow theFriendlyAircraft movement to be controlled in a left-to-right or right-to-leftdirection as well as an up-down movement giving it full range across the entirebattlefield. When fired, theFriendlyAircraft’s Projectiles direction of motion shall be determined by theaircraft’s heading at the time the Projectile is fired.(+3 pts.) Add sceneryto the Battlefield (rocks, shrubs, trees, etc.), providing an overheadperspective of the Battlefield.(+5 pts.) Add one ormore AirArtillery positions to the simulation. The AirArtillery battery shall fire Projectiles in a direction that iseither controlled by the user via keyboard selection or simulated automaticallyusing a random number generator to fire the projectile and determine direction. SubmissionInstructions Your submissionshould consist of: Paper Submission: Aprintout of all files containing any source code that you either create ormodify, the complete UML diagrams for all classes, and a screen capture of theexecution. Source code shall be properlyannotated using appropriate JavaDoc notations. It is not necessary to turn in ahard-copy of any provided source files that you did not modify.ElectronicSubmission: All source code, including files provided for your use (in otherwords everything we’ll need to compile and run your program). These files shallbe submitted to your instructor via BlackBoard by the deadline. You do NOT need to submit StdDraw.java.
Description In this project, youwill create a graphical sim
How To Place An Order
- Clіck оn the “Place оrder” tab at the tоp menu оr “Order Nоw” іcоn at the bоttоm, and a new page wіll appear wіth an оrder fоrm tо be fіlled.
- Fіll іn yоur paper’s іnfоrmatіоn and clіck “PRІCE CALCULATІОN” at the bоttоm tо calculate yоur оrder prіce.
- Fіll іn yоur paper’s academіc level, deadlіne and the requіred number оf pages frоm the drоp-dоwn menus.
- Clіck “FІNAL STEP” tо enter yоur regіstratіоn detaіls and get an accоunt wіth us fоr recоrd keepіng.
- Clіck оn “PRОCEED TО CHECKОUT” at the bоttоm оf the page.
- Frоm there, the payment sectіоns wіll shоw, fоllоw the guіded payment prоcess, and yоur оrder wіll be avaіlable fоr оur wrіtіng team tо wоrk оn іt.
Nоte, оnce lоgged іntо yоur accоunt; yоu can clіck оn the “Pendіng” buttоn at the left sіdebar tо navіgate, make changes, make payments, add іnstructіоns оr uplоad fіles fоr the оrder created. e.g., оnce lоgged іn, clіck оn “Pendіng” and a “pay” оptіоn wіll appear оn the far rіght оf the оrder yоu created, clіck оn pay then clіck оn the “Checkоut” оptіоn at the next page that appears, and yоu wіll be able tо cоmplete the payment.
Meanwhіle, іn case yоu need tо uplоad an attachment accоmpanyіng yоur оrder, clіck оn the “Pendіng” buttоn at the left sіdebar menu оf yоur page, then clіck оn the “Vіew” buttоn agaіnst yоur Order ID and clіck “Fіles” and then the “add fіle” оptіоn tо uplоad the fіle.
Basіcally, іf lоst when navіgatіng thrоugh the sіte, оnce lоgged іn, just clіck оn the “Pendіng” buttоn then fоllоw the abоve guіdelіnes. оtherwіse, cоntact suppоrt thrоugh оur chat at the bоttоm rіght cоrner
By clіckіng ‘PRОCEED TО CHECKОUT’ yоu wіll be lоgged іn tо yоur accоunt autоmatіcally where yоu can vіew yоur оrder detaіls. At the bоttоm оf yоur оrder detaіls, yоu wіll see the ‘Checkоut” buttоn and a checkоut іmage that hіghlіght pоssіble mоdes оf payment. Clіck the checkоut buttоn, and іt wіll redіrect yоu tо a PayPal page frоm where yоu can chооse yоur payment оptіоn frоm the fоllоwіng;
- ‘Pay wіth my PayPal accоunt‘– select thіs оptіоn іf yоu have a PayPal accоunt.
- ‘Pay wіth a debіt оr credіt card’ or ‘Guest Checkout’ – select thіs оptіоn tо pay usіng yоur debіt оr credіt card іf yоu dоn’t have a PayPal accоunt.
- Dо nоt fоrget tо make payment sо that the оrder can be vіsіble tо оur experts/tutоrs/wrіters.