Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save euwbah/3e43e261a56069e23367fb8e54a03656 to your computer and use it in GitHub Desktop.
Save euwbah/3e43e261a56069e23367fb8e54a03656 to your computer and use it in GitHub Desktop.
package loginpageforassignment;
/**
*
* @author kenzewee
*/
import javax.swing.JOptionPane;
import static javax.swing.text.html.HTML.Tag.S;
import loginpageforassignment.GUIHelper;
import loginpageforassignment.MemeQuizQuestions.QuestionResult;
import loginpageforassignment.MemeQuizQuestions;
public class MemeQuizQuiz {
public static String RawQuestion;
private String UserIn;
public MemeQuizQuestions[] MemeQuestions;
public MemeQuizQuiz(){
MemeQuestions = new MemeQuizQuestions[]{
// Getting data from user
new MemeQuizQuestions ("Who created the word 'meme'? \n1.Richard Dawkins \n 2.Donald Trump \n 3.Christopher Poole \n 4.Tom Anderson \n 5.I need a hint",null,"1",null,"Donald Trump and Tom Anderson did not make the word meme,obviously"),
new MemeQuizQuestions ("What cannot be considered a 'meme'? \n1.a viral video clip \n 2.a website \n 3.a catchphrase \n 4.None of the above \n 5.I need a hint",null,"4",null, "What was mentioned in the introduction text?"),
new MemeQuizQuestions ("Many internet memes have originated from 4chan(an English-language imageboard website). Which meme has NOT originated from the site? \n1.LOL cats \n 2.Rickrolling \n 3.Pedobear \n 4.Nyan Cat \n 5.I need a hint",null,"4",null,"8-bit and annoying."),
new MemeQuizQuestions ("What is meme primarily associated with pictures of Shiba Inus (nicknamed “Shibe”)\nand captions written in the Comic Sans font? \n1.Doge \n 2.Nyan Cat \n 3.Smiledog \n 4.Baby Husky \n 5.I need a hint",null,"1",null,"Much hint,so learning,wow"),
new MemeQuizQuestions ("Which emoticon meme is commonly refered on youtube as Lenny? \n1.( ͡° ͜ʖ ͡°) \n 2.(╯°□°)╯︵ ┻━┻ \n 3.¯\\_ツ_/¯ \n 4.ಠ_ಠ \n 5.I need a hint",null,"1",null,"Lenny is commonly used when youtube viewers want \n to comment something that is lewd."),
new MemeQuizQuestions ("From mid 2015 to late 2016,memes about frogs have surged in popularity.\nWhich of the following is NOT a frog meme? \n1.Dat Boi\n2.Pepe the frog\n3.Not my business Kermit\n4.SwegToad \n 5.I need a hint",null,"4",null,"Are toads also frogs?"),
new MemeQuizQuestions ("What is the name of celebrity who's meme catchphrase is 'smoke weed everday'? \n(Type 5 if you need a hint)(Any words in the answer must begin with capitals)",null,null,"Snoop Dogg","This internet rapping celebrity has worked woth Dr Dre in the past."),
new MemeQuizQuestions ("A popular genre of short comic-style memes using a growing set of pre-made cartoon faces "
+ "\n are known as one of the most classic internet memes.\n What are is the name of the most popular cartoon face of the meme comic? "
+ "\n(Type 5 if you need a hint)(Any words in the answer must begin with capitals)",null,null,"Rage face","FFFFFFFUUUUUUUUUUUU"),
new MemeQuizQuestions ("A dank meme is a sub-genre of memes that are intentionally bizarre or have \nexhausted their comedic value to the the point that they have become a Meme cliché."
+ "\nWhat is the name to descibe a meme that is exceptionally 'dank'?"
+ "\n(Type 5 if you need a hint)(Any words in the answer must begin with capitals)",null,null,"Spicy Meme","Whats more dank than dank?"),
new MemeQuizQuestions ("Grumpy Cat or Tardar Sauce is the arguably the most famous Internet cat of all time who is"
+ " \nknown for having a birth disorder that makes her face appear to have an angry expression. "
+ "\nWhich year did the meme become popular and on what site was the meme first posted? \n(Type your answer as Year,Site or Site,Year in the box)"
+ "\n(Type 5 if you need a hint)(Any words in the answer must begin with capitals)",null,null,"2012,Reddit","The year and site of origin for the meme is the also \n the same year and site of origin for Ermahgerd! and Potato Jesus."),
};
}
public void takeQuizMCQ() {
for(int i=0; i<6 ; i++){
for (MemeQuizQuestions question : MemeQuestions) {
QuestionResult result = question.showMCQQuestion();
if(result == QuestionResult.CORRECT) {
GUIHelper.show("Correct!");
}if(result == QuestionResult.HINT) {
GUIHelper.show(question.hintans);
}else {
GUIHelper.show("Wrong!The answer was "+question.MCQans+".");
}
}break;
}
}
public void takeQuizQUESTIONS() {
for(int i=6; i<10 ; i++){
for (MemeQuizQuestions question : MemeQuestions) {
QuestionResult result = question.showQuestion();
if(result == QuestionResult.CORRECT) {
GUIHelper.show("Correct!");
}if(result == QuestionResult.HINT) {
GUIHelper.show(question.hintans);
}else {
GUIHelper.show("Wrong!The answer was "+question.QUESTIONans+".");
}
} break;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment