Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 17 additions & 12 deletions src/LikeAGirl.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,32 @@ public static void main(String[] args) {
String scriptTemplateLine4 =
"How do you think it affects them when somebody uses \"%s\" as an insult? Choice (good: %d, bad: %d) ";
String scriptTemplateLine5 = "You answered %d%n%s.";
String ansGood = "Always wants to change that.%nEmotional Damage %f";
String ansBad = "Good for you.%nEmotional Damage %f";
String likeAGirl = "Like a Girl";
String ansBad = "Always wants to change that.%nEmotional Damage %f";
String ansGood = "Good for you.%nEmotional Damage %f";
String likeABoy = "Like a Boy";

// integer variable
int good = 0;
int bad = 1;
int good = 1;
int bad = 2;
// 32 bit floating point variable
float emotionalDamage = 0.0f; // 32 Bit, but it does exist!
float emotionalDamage = 100.0f; // 32 Bit, but it does exist!
// double precision floating point variable
double dEmotionalDamage = 100.0; // Double precision
double dEmotionalDamage = 50.0; // Double precision
// boolean variable
boolean trueOrFalse;
// Scanner variable for reading input.
Scanner s = new Scanner(System.in);

System.out.println(
String.format(scriptTemplateLine1, likeAGirl));
String.format(scriptTemplateLine1, likeABoy));

// Example of using printf and platform specific line separator "%n" to
// format instead of String.format
System.out.printf(scriptTemplateLine2, likeAGirl);
System.out.printf(scriptTemplateLine2, likeABoy);

System.out.println(String.format(scriptTemplateLine3, likeAGirl));
System.out.println(String.format(scriptTemplateLine3, likeABoy));

System.out.printf(scriptTemplateLine4, likeAGirl, good, bad);
System.out.printf(scriptTemplateLine4, likeABoy, good, bad);

int answer = Integer.parseInt(s.nextLine());

Expand All @@ -49,7 +49,12 @@ public static void main(String[] args) {
)
);

trueOrFalse = (answer != good); // if answer == 1 (i.e. good), then trueOrFalse should be False
trueOrFalse = (answer != bad); // if answer == 1 (i.e. good), then trueOrFalse should be False
System.out.printf("Did you answer like a nice person? %B%n", trueOrFalse);
}
}
//I did not know where to put my comments for section two, so they will go here. The variables we have are int,
// float, double, and boolean. For int the data type is good,bad. For float its emotional damage. For double its also
// emotional damage. For boolean its true or false. For int any integer can be assigned. For float and double its 0-100.
// For boolean its only true or false that can be assigned. Before I changed the code I had to change the word Girl to Boy
// within all the variables that's the only example I can think of .