Java coding /AN

1. The screen must be 1280 pixels wide and 960 pixels high OR (for those working with a small laptop screen) 952 pixels wide and 714 pixels high.

2.There must be a large area at the top of the screen which represents the playfield and a smaller area below that represents the “launch zone”. Both must be the full width of the window. Note: loops and randomness are used to make the play-field in cooper-golf, you don’t need to do this for this part, but you will need to in a later part.

3. Some representation of the player will move back and forth across the launch zone. In cooper-golf we use an arrow, but you can use your imagination to make something else.

4. You may not use images (i.e. PImage, sprites, png, jpg, gif) for your player. They must be made from Processing shapes (ellipse, circle, rect, arc, etc).

5. When the user presses any key, the player stops moving and goes into “launch mode”. In launch mode, the power of the hit is determined. It starts off low and grows over time until full power after 4 seconds (note: it must be 4 seconds when Processing is running at the default frame rate of 60 frames per second). You must have some way of indicating clearly the power is increasing. In cooper-golf the colour of the player intensifies as the power increases.
When the user hits any key while in launch mode, the ball is launched with the selected strength. Zero strength must cause the ball to stay in the launch zone and full strength must cause the ball to bounce off the top edge of the window.

6. The ball must slow down due to friction. You may use a simple formula like

> ball speed = previous ball speed * friction coefficient

Any friction coefficient that works in your game is fine.

You are welcome to include more complex physics if you like. For example, in cooper-golf the colour of the grass effects the friction on that part of the play field!

7. The ball will keep moving until it stops. When it stops, if the ball is entirely within the hole, the game is won. Otherwise the game resets.

8. The playing field should be a patchwork of random colours, not just one colour.

9. Your ball drawing and player drawing code must be in functions with exactly these signatures

void drawBall(float x, float y)

void drawPlayer(float x, float y)

Old balls stay in place-

Now vary the game so that missing the hole does not end the game. Instead the old ball stays in place (up to 10 balls) and only the player resets. The player may then make another shot according to the rules above.

10. The player makes another shot but their ball may collide with the old balls left on the playing field. If it does, the balls should deflect in a realistic way with half the speed of the moving ball being transferred to the other ball.

You cannot use any extra processing libraries or plugins.
You cannot use classes
You cannot use multiple tabs or multiple files
You cannot use transformations such as rotate, translate, scale
You cannot use images

Get 20% Discount on This Paper
Pages (550 words)
Approximate price: -

Try it now!

Get 20% Discount on This Paper

We'll send you the first draft for approval by at
Total price:

How it works?

Follow these simple steps to get your paper done

Place your order

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

Quality Custom Writers has assembled a team of highly skilled writers with diverse experience in the online writing circles. Our aim is to become a one stop shop for all your Academic/ online writing. Check out below our amazing service!


Essay Writing Services

At Quality Custom Writers, we prioritize on all aspects that creates a good grade such as impeccable grammar, proper structure, zero-plagiarism, and conformance to guidelines. The principal purpose of essay writing is to present the author's evaluation concerning a singular subject about which they have made. Since Professionalism is the mother of every success, try our team of experienced writers in helping you complete your essays and other assignments.


Admission Papers

You have been trying to join that prestigious institution you long yearned for, but the hurdle of an admission essay has become a stumbling block. We have your back, with our proven team that has gained invaluable experience over time, your chance of joining that institution is now! Just let us work on that essay.How do you write an admission essay? How do you begin the essay? For answers, try Quality Custom Writers Now!


Editing and Proofreading

Regardless of whether you're pleased with your composing abilities, it's never an impractical notion to have a second eye go through your work. The best editing services leaves no mistake untouched. We recognize the stuff needed to polish up a writing; as a component of our editing and proofreading, we'll change and refine your write up to guarantee it's amazing, and blunder free. Our group of expert editors will examine your work, giving an impeccable touch of English while ensuring your punctuation and sentence structures are top-notch.


Technical papers

We pride ourselves in having a team of clinical writers. The stringent and rigorous vetting process ensures that only the best persons for job. We hire qualified PhD and MA writers only. We equally offer our team of writers bonuses and incentives to motivate their working spirit in terms of delivering original, unique, and informative content. They are our resources drawn from diverse fields. Therefore your technical paper is in the right hands. Every paper is assessed and only the writers with the technical know-how in that field get to work on it.


College Essay Writing

If all along you have been looking for a trustworthy college essay service provider that provides superb academic papers at reasonable prices, then be glad that you search has ended with us. We are your best choice! Get high-quality college essay writing from our magnificent team of knowledgeable and dedicated writers right now!


Quality Assignment/Homework Help

We give the students premium quality assignments, without alarming them with plagiarism and referencing issues. We ensure that the assignments stick to the rules given by the tutors. We are specific about the deadlines you give us. We assure you that you will get your papers well in advance, knowing that you will review and return it if there are any changes, which should be incorporated.

× How can I help you?