19 May QuestionBased off of the methods I wrote I need you to create a Class n
Question
create a class named Projectile with the following private instance variables: double velocity double seconds double angle double height double distance Your class should contain the following public methods: * a three argument constructor that accepts the velocity, seconds, and angle from the client and places these values into the corresponding instance variables. * a set and get method for each instance variable public double getVel() public double getHeight() public double getSecs() public double getAngle() public double getDistance() private setVel(double v) private setSecs(double s) private setAngle(double a) private setHeight(double h) private setDistance(double d) and two additional methods: double calcDistance() //calculates the distance, stores this into the private instance //variable distance, and returns this value to the client double calcHeight() //calculates the height, stores this into the private instance //variable height, and returns this value to the client The calcHeight and calcDistance methods should calculate height and distance according to the formulas from assignment #1 and they should use the get methods to obtain the values for Velocity, seconds, and angle where necessary. You can test your implementation of Projectile by coping and running TestProjectile.java from the class directory. The command to copy this file is: cp /home2/classes/csi205/TestProjectile.java TestProjectile.java Compile and run TestProjectile. This is a client program that will use and test your Projectile class and methods. You should submit your Projectile.java file with the following command: turnin-csi205 -c csi205 -p prog2 Projectile.java Notes: -Include Comments in your code and format your program neatly. Remember to include your name and Student ID# in your comments. Comment your variables and provide comments in each of your public methods -All variables you use for mathematical computations should be of type double -The name of the file which you save your application, and hence the class name, should be named Projectile.java. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Then for the Client~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
About Writedemy
We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.
How It Works
To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Are there Discounts?
All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.
