I am nearly finishing the Unquote project (Cumulative project 2), but only to find out a bunch of errors in my code snippets.
Here’s my AndroidOS. java
public class AndroidOS {
public AndroidOS() {
System.out.println("AndroidOS Booting Up...");
}
public void runQuizApp() {
// Create three questions here
Question question1 = new Question(921238, "1024 ft", "1063 ft", "1124 ft", "1163 ft", 1);
Question question2 = new Question(107343, "Charles Babbage", "John Carmack", "Alan Turing", "Ada Lovelace", 3);
Question question3 = new Question(748294, "What is the name for the patch of skin found on your elbow", "Fascia Elbora", "Wenis", "Todd", 2);
System.out.println("Question 1: " + question1.questionText);
}
public static void main(String[] args) {
System.out.println("Starting: AndroidOS");
AndroidOS androidOS = new AndroidOS();
androidOS.runQuizApp();
}
}
The errors are:
AndroidOS.java:8: error: constructor Question in class Question cannot be applied to given types;
Question question1 = new Question(921238, "1024 ft", "1063 ft", "1124 ft", "1163 ft", 1);
^
required: int,String,String,String,String,String,int
found: int,String,String,String,String,int
reason: actual and formal argument lists differ in length
AndroidOS.java:10: error: constructor Question in class Question cannot be applied to given types;
Question question2 = new Question(107343, "Charles Babbage", "John Carmack", "Alan Turing", "Ada Lovelace", 3);
^
required: int,String,String,String,String,String,int
found: int,String,String,String,String,int
reason: actual and formal argument lists differ in length
AndroidOS.java:12: error: constructor Question in class Question cannot be applied to given types;
Question question3 = new Question(748294, "What is the name for the patch of skin found on your elbow", "Fascia Elbora", "Wenis", "Todd", 2);
^
required: int,String,String,String,String,String,int
found: int,String,String,String,String,int
reason: actual and formal argument lists differ in length
./Question.java:22: error: incompatible types: int cannot be converted to String
imageId = imageIdentifier;
^
4 errors
I appreciate any insights as to what went wrong here.