Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Below is my class7 project You will be modifying the old man code from class 7 t

ID: 3598482 • Letter: B

Question

Below is my class7 project
You will be modifying the old man code from class 7 to include a boolean variable and two loops. The following lists the requirements as overviewed in class: Boolean variable and loop one 1. Add in a boolean variable to keep track of whether the loop is done or not 2. Add in a While loop, which tests on the boolean variable, that allows the user to continue to guess until they finally get it right. Loop two In the class 7 project when the user finally gets it right you moved the red corvette onto the screen and stopped it near the old man. The new addition will take place right after the car stops. The new addition is to have the car do a little donut (the car somewhat makes a circle). 1. Setup a loop (using a While or Loop) to execute four times 2. Inside the loop have the following steps done together car turn 1/4 turn (left or right, whichever looks better) car move forward a short distance

Explanation / Answer

<%@ page errorPage="error.jsp" import="java.util.Set,java.util.Iterator,java.util.Map,chat.*"%>

<%

String nickname = request.getParameter("chatterName");

%>

<HTML>

<HEAD>

<META http-equiv="pragma" content="no-cache">

<meta name="Author" content="Sukhwinder Singh (ssruprai@hotmail.com">

<TITLE><%=nickname%>'s information</TITLE>

<LINK rel="stylesheet" href="&lt;%=request.getContextPath()%&gt;/chat.css" type="text/css">

</HEAD>

<BODY bgcolor="#FFFFFF">

<%

if (nickname != null)

{

ChatRoomList roomList = (ChatRoomList)application.getAttribute("chatroomlist");

ChatRoom chatRoom = roomList.getRoomOfChatter(nickname);

if (chatRoom != null)

{

Chatter chatter = chatRoom.getChatter(nickname);

%>

<div align="center">

<center>

<table border="0" width="100%" cellpadding="0" cellspacing="0">

<tr>

<TD valign="top"><h4>Nickname: </h4></td><TD valign="top"><%=nickname%></td>

</tr>

<tr>

<TD valign="top"><h4>Sex: </h4></td><TD valign="top"><%=chatter.getSex()%></td>

</tr>

<tr>

<TD valign="top"><h4>Age: </h4></td><TD valign="top"><% int age = chatter.getAge();

if(age == -1)

out.write("Not specified");

else

out.write(String.valueOf(age));

%></td>

</tr>

<tr>

<TD valign="top"><h4>Email: </h4></td><TD valign="top"><% String email = chatter.getEmail();

if (email != null && email.length() >0)

out.write(email);

else

out.write("Not specified");

%></td>

</tr>

<tr>

<TD valign="top"><H4>Comment: </h4></td><TD valign="top"><%

String comment = chatter.getComment();

if (comment != null && comment.length() >0)

out.write(comment);

else

out.write("Not specified");

%></h4>

</tr>

<tr><TD valign="top">&nbsp;</td>

<TD valign="top">

<form name="closing">

<input type="button" value="Close">

</form>

</td>

<tr>

</table>

</center>

</div>

<%

}

else

{

%>

<div align="center">

<center>

<span class="error">User <%=nickname %> doesn't exist.<br>He / She may have logged out.</span>

<form name="closing">

<input type="button" value="Close">

</form>

</center>

</div>

<%

}

}

else

{

%>

<div align="center">

<center>

<span class="error">No username provided.</span>

</center>

</div>

<%

}

%>

</BODY>

</HTML>

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote