Find Jobs
Hire Freelancers

CoinFlip2

$10-15 USD

Completed
Posted about 21 years ago

$10-15 USD

Paid on delivery
//[login to view URL] the program below so to display on screen each coin flip. //[login to view URL] two boolean variables with he second variable //to store the outcome of the flip. //[login to view URL] the user fails to enter heads or tails, have the program prompt //user to re-enter until the proper input is made (heads or tails or exit). //use jpb package for program operations (create a //folder called jpb and place the four attached zipped files //inside of it import jpb.*; public class Coinflip2 { public static void main (String[] args) { boolean headsWasSelected = false; // Prompt user to guess heads or tails [login to view URL]("Enter heads or tails: "); String userInput = [login to view URL](); if ([login to view URL]("heads")) headsWasSlected = true; else if (![login to view URL]("tails")) { [login to view URL]("Sorry, you didn't enter heads " + "or tails; please try again."); return; } //Choose a random number double randomNumber = [login to view URL]() ; //Determine whether user guessed correctly if (headsWasSelected && randomNumber < 0.5) [login to view URL](You win!"); else if (!headsWasSelected && randomnumber >= 0.5) [login to view URL]("You win!"); else [login to view URL]("Sorry, you loose."); } } ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request. 3) Complete ownership and distribution copyrights to all work purchased. ## Platform Use Java code to import jpb package.
Project ID: 2916293

About the project

2 proposals
Remote project
Active 21 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$4 USD in 14 days
5.0 (65 reviews)
4.7
4.7
2 freelancers are bidding on average $8 USD for this job
User Avatar
See private message.
$12.75 USD in 14 days
4.2 (111 reviews)
4.4
4.4

About the client

Flag of UNITED STATES
United States
5.0
59
Member since Oct 3, 2001

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.