Question: CHALLENGE ACTIVITY 4 . 3 . 2 : Bidding example. Variable keepBidding is initially assigned with ' y ' . Within the while loop, keepBidding

CHALLENGE
ACTIVITY
4.3.2: Bidding example.
Variable keepBidding is initially assigned with 'y'. Within the while loop, keepBidding is updated with the user's next input value. Complete the while loop's expression to terminate the while loop if the user enters 'n'.
Ex: If the input is y y, then the output is:
I'll bid $3!
Continue bidding? (yn) I'll bid $6!
Continue bidding? (yn I'll bid $9!
Continue bidding? (yn)
Learn how our autograder works
528040.3489528.qx3zqy7
import java.util.Scanner;
public class AutoBidder {
public static void main(String[] args){
Scanner scnr = new Scanner(
System.in);
char keepBidding;
int nextBid;
nextBid =0;
keepBidding ='y';
while your solution goes here {
nextBid = nextBid +3 ;
System.out.println("I'll bid $ + nextBid +"!");
System.out.print("Continue bidding? (yn)");
keepBidding =scnr*next()*charAt();
}
Run
 CHALLENGE ACTIVITY 4.3.2: Bidding example. Variable keepBidding is initially assigned with

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!