Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //promptbank/object/Method
- public class PromptBank {
- //constructor initiallizing variables
- private String [] questions;
- private String [] statements;
- //le
- public PromptBank(){
- questions = new String[3]; //initialize your array to the correct length to match your number of questions you populate it with
- statements = new String[3];//initialize your array to the correct length to match your number of questions you populate it with
- }
- //concadinate first and last, change blank1 and blank2 into first and last
- public void populateStatementsArray(String First, String Last){
- statements[0] = "Tell me more about " + First + " and " + Last;
- statements[1] = First + " seems important to you, so does " + Last + ". Please tell me more.";
- statements[2] = First + " and " + Last + " seem to be on your mind. Let's talk about it.";
- /*complete this method with your other statements using BLANK1 for word1
- * and BLANK2 for word2 place holder
- */
- }
- public void populateQuestionsArray(String First, String Last){
- questions[0] = "Is there anything else about " + First + " and " + Last + "?";
- questions[1] = "Does " + First + " bother you? How about " + Last + "?";
- questions[2] = "Are " + First + " and " + Last + " things you think about often?";
- /*complete this method with your other questions using BLANK1 for word1
- * and BLANK2 for word2 place holder
- */
- }public static int num() {
- //Create a method for the random integer number to change double to integer
- double icrs = 2;
- double dr = 0;
- double random = Math.random()*((2-0) + 1) + 0;
- int num = (int) random;
- return num;
- }
- //change numbers into integer.
- // declare an integer that converts double into an integer
- //Get Statement and Question and Return them
- public String getRandomStatementTrunk(int Num1){
- return statements[Num1];
- }
- //fill in the method so it randomly selects the statement template
- //from the questions array ... hint use Math.random() to get the random index
- //so you can replace BLANK1 and BLANK2 with the appropriate words
- public String getRandomQuestionTrunk(int Num2) {
- return questions[Num2];
- }
- //fill in the method so it randomly selects the question template
- //from the questions array ... hint use Math.random() to get the random index
- //so you can replace BLANK1 and BLANK2 with the appropriate words
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement