Home Add a button to an app Let's do a quick test! You must answer at least 7 questions correctly to pass this quiz. byHasnain Rasheed -October 24, 2021 0 Which of the following is an example of a class?Choose as many answers as you see fit.A Car class that has a make and model, and that can be drivenCorrect!A Flower class that has a scentCorrect!A Puppy class that has breed, weight and age, and that can barkCorrect!A ShoppingCart class that has a cart size and cart value, and that can hold itemsCorrect!A Song class that has lyricsCorrect!None of these are examples of a class.Which of the following is a difference between a class and an instance?Choose as many answers as you see fit.You can think of a class as a blueprint and an instance as the actual “thing".Correct!A class is like architectural plans for a bridge, and the Golden Gate bridge an instance of those plans.Correct!A class is for defining categories of "things", while instances are for defining their properties.You can create multiple instances from a class, but you can't create classes from instances.Correct!For each of the following types of information, select whether it should be part of a class or an instance.Each answer only matches one item.Information about properties shared by all "things" belonging to the class, such as number of sides, number of legs, or that it has a color. Class Instance ClassCorrect!The specifics about a property, such as the specific color of a “thing” that can have a color. Class Instance InstanceCorrect!True or false? Every MainActivity class in Android must have a main() function.TrueFalseCorrect!Which of the following is NOT a way for creating a comment in Kotlin?Choose as many answers as you see fit.Add // at the beginning of or inside a line and anything after that // is considered a comment.Put /* or /** to start a block comment, and end it with */.Use // to turn the rest of a function into a comment.Correct!Use /* to start a comment that is one line long.Correct!Which of the following statements about a conditional statement is true?Choose as many answers as you see fit.Partially Correct.A conditional statement is a way for you to set up a condition and ensure that code following it is only executed if that condition is met.Correct!A conditional statement does not require any keywords.A conditional statement should only be used with integers as input.Incorrect.A conditional statement can be used within functions to return output based on conditions defined in that function.Correct!What is a good reason for you to add comments to your code?To explain to yourself or others why the code is written a certain way.To structure code, like chapter headings in books.To point out some part of the code that is very important.To explain to other developers how to use your code for their own programs.All of the aboveCorrect!None of the aboveWhich of the following are Kotlin data types?Choose as many answers as you see fit.IntRangeCorrect!NumIntCorrect!Boolean (true or false)Correct!Which of the following are valid keywords used in conditional statements in Kotlin?Choose as many answers as you see fit.if, elseCorrect!if, then, stopwhenCorrect!repeat, finish Facebook Twitter