Reference no: EM131074262
Here's the prompt and I've included my code for what i've done so far at the bottom.
I need to figure out how to make the math.Random
statement output into behaviors (reading, writing, drawing)
You will need to:
1. create a method in the class student that returns what the student is doing
2. this method have to generate the behavior randomly. It can't return the same thing every time.
3. implement a for loop in the application to call for the student behavior for 20 times
1.) create a method called whatsUp( ) in the student class. This method is going to return what the student is doing in class. At first, make it return always the same thing, a String for instance, "surfing the web". Later I will suggest how to return different things.
2. Change the app: include a for loop such as:
for (int j = 1; j < 20; j++)
{
// here, display what the student is doing using the whatsUp( ) method
// You should know how to do create an instance of a student,
// and display some basic information
}
3. If you made till here and read my example with random numbers above, try to change the whatsUp method so that it returns different behaviors randomly
public static void main(String[] args) {
String firstName1 = "Jon";
String lastName1 = "Snow";
double x;
//behavior = st.whatsUp();
for (int i=0; i x = Math.random();
System.out.println("My Random number" + x);
}
}
private String behavior (double x) {
return "hello";
}
}
if (behavior.matches("reading"))
{
i++;
}
if (behavior.matches("writing"))
{
j++;
}
if (behavior.matches("drawing"))
{
k++;
Defining a problem
: The first stage of the project is to select a topic, begin preliminary research, define the rhetorical situation (subject, purpose, readers, and context of use), and describe the problem. This is a pre-writing assignment designed to help you start..
|
Passionate shepherd to his love
: Assignment: Analyze and write 750 words on the poem above from the assigned readings using one of the following critical approaches (NOT reader response or biographical criticism)
|
Meaning of the poem change
: Did the meaning of the poem change when the lines were divided differently? How? How did the rhythm of reading the poem change? What have you learned about line and stanza division through doing this activity?
|
Does the information media have social responsibility
: Does the information media have social responsibility? If yes, in what ways? If not, why not? What is the role of the information and news media in the shaping of political opinions?
|
Implement a for loop in the application
: Create a method in the class student that returns what the student is doing and this method have to generate the behavior randomly. It can't return the same thing every time.
|
Role of personality in affecting situational behavior
: Write a 1.400- to 1,750-word paper in which you compare and contrast the theories selected. Address the following: Describe the role of personality in affecting situational behavior
|
Problem regarding the character development
: Describe a key conflict in the play and how it corresponds to a character's development. Describe two key literary techniques and elements of drama that aid in developing the conflict.
|
Characteristics or christian schools
: (300 word count) Prompt: There are some educators who do not like to label a school as "Christian" or not. As educators, can you work in a public school and lead a "Christian classroom"?
|
Question regarding the sound venture
: Death of a Salesman- Would Happy and Biff be effective business owners and would their enterprise be a sound venture if you were looking to invest?
|