120 likes | 120 Views
<br>Visit Below Link, To Download This Course:<br><br>https://www.tutorialsservice.net/product/cis-247-devry-complete-quiz-package/<br><br>Or <br>Email us on<br>SUPPORT@TUTORIALSSERVICE.NET<br><br>CIS 247 DeVry Complete Quiz Package<br>CIS247<br>CIS 247 DeVry Week 1 Quiz Latest<br>1. Question : (TCO 1) The components of a class are called _____ and _____.<br>• elements; objects<br>• attributes; methods<br>• objects; instantiations<br>• properties; descriptions<br>
E N D
CIS 247 DEVRY COMPLETE QUIZ PACKAGE Visit Below Link, To Download This Course: https://www.tutorialsservice.net/product/cis-247-devry-complete-quiz-package/ Or Email us on SUPPORT@TUTORIALSSERVICE.NET CIS 247 DeVry Complete Quiz Package CIS247 CIS 247 DeVry Week 1 Quiz Latest 1. Question : (TCO 1) The components of a class are called _____ and _____. elements; objects attributes; methods objects; instantiations properties; descriptions Question 2. Question : (TCO 1) Which of the following would be the most appropriate choice for a method in a Cup class? drink() hot() break() color() Question 3. Question : (TCO 1) Which of the following statements is/are true? Objects communicate through message passing. An object must be defined before you can create a class. The state of an object should not be hidden. Implementation details should be visible through the interface of a class.
A and C All are true None are true Question 4. Question : (TCO 1) Which of the following would be the most appropriate choice for a data member in a Screen class? dimensions turnoff refresh activate Screensaver Question 5. Question : (TCO 1) The property of _____ describes the packaging of state and behavior together in an object. data hiding abstraction encapsulation All of the above None of the above Question 6. Question : (TCO 8) Most professional coding standards use _____ for class names. underscores along with all upper case words Method Class case no specific naming convention Pascal case Question 7. Question : (TCO 1) Examine the ClockType class definition. How many attributes does it contain? class ClockType { public void setTime(int hour, int min, int sec); public int getTime(); public void printTime(); private int hr; public int min; public int sec; } 2 3 9
6 An average of 5 because (7+3)/2 = 5 Question 8. Question : (TCO 1) Assume we have two classes and have instantiated an object from each class. How many copies of each class’s attributes and methods exist in the instantiated objects? Two copies, one copy of the first class and one of the second Zero, the objects do not have attributes and methods Only one copy and both objects share it None of the above Question 9. Question : (TCO 1) Both _____ and _____ allow for code reuse and the building of more complex systems. inheritance; composition UML diagrams; serialization messaging; object behaviors None of the above Question 10. Question : (TCO 1) Which of the following is a valid statement for a method definition in Java? public int computeAverage { return 1; } public int computeAverage ( return 1; ) public int computeAverage () { return 1; }; public int computeAverage () { return 1; } CIS 247 DeVry Week 2 Quiz Latest 1. Question : (TCO 2) Only those class members which are part of the interface of the class should be declared as _____. open banned private public Question 2. Question : (TCO 2) A public accessor is usually paired with a public _____ to allow an outside class to set and retrieve the value of an object’s attribute. constructor mutator getter None of the above
Question 3. Question : (TCO 2) Which of the following statements is/are true? If a method is public, it is considered part of the class implementation. If you declare an attribute as private, you do not have to worry about tracking down every piece of code that might have changed the attribute when debugging. While designing a class you add as many interfaces as possible, trying to cover all possible future user needs. All of the above None of the above Question 4. Question : (TCO 2) A Waiter is responsible for taking the order from the Customer based on the menu, informing the Chef of the order, and delivering the requested food back to the Customer. A Chef is responsible for preparing the food, while the Customer is responsible for placing an order from the menu. In identifying the interface of the Waiter object, which of the following would you consider as (an) appropriate message(s) the Waiter should respond to: “Please bring me chicken soup” “Can you tell me how to make macaroni and cheese?” “How many hours do you work?” All of the above Only A and B Question 5. Question : (TCO 5) The purpose of a(n) _____ is to initialize the object’s data members when an object is instantiated. method constructor class destructor Question 6. Question : (TCO 5) Which of the following method pairs are not examples of method overloading? public void roll() ; public int move(int x) public int charge(int x) ; public int charge(int y) public int subtract() ; public void subtract() All of the above Only B Question 7. Question : (TCO 5) Consider the following class definition. public class Rose { private int petals; private double cost; public Rose() { petals = 30; cost = 0.0; } public Rose(int p) { petals = p; cost = 0.0; } public int getPetals() { return petals; }
public void setCost(int amount) { cost = amount; } } Which of the following are true? (i) The attribute cost can be set to a new value, by a user of this class. (ii) System.out.println (“The rose has: ” + Rose.getPetals()); is a valid statement. (iii) There are overloaded constructors in the class. i. ii Only i and iii None are true All are true Question 8. Question : (TCO 2)Assume a class has a data member called ‘color’. Can another class have a data member called ‘color’? Yes, as long as the data member is used in the same way. No, this is not possible because the compiler would not know which data member to use. Yes, but only if the classes are not in the same namespace. None of the above Question 9. Question : (TCO 5) Which error handling technique is the least appropriate when developing an application? Check for potential problems and abort the application when a problem is encountered. Check for potential problems and throw an exception. Check for potential problems, catch the mistake and try to fix it. Ignore the problem; all applications crash at some point. Question 10. Question : (TCO 2) Which is an appropriate choice for a static (or otherwise called class) attribute in a Building class? Number Of Buildings Number Of Apartments Number Of Floors None of the above CIS 247 DeVry Week 3 Quiz Latest 1. Question : (TCO 2) Which of the following statements is/are true? Object names are listed in the middle section of a UML diagram. Attribute names are listed in the middle section of a UML diagram. Method names are listed in the middle section of a UML diagram. Class names are listed in the middle section of a UML diagram. None of the above
Question 2. Question : (TCO 2) Java, C#, and C++ all allow for the use of comments. Which of the following statements are true regarding comments? The compiler will ignore all comments if they are properly formatted. The IDE will ignore all comments if they are properly formatted. The output console will ignore all comments if they are properly formatted. All of the above None of the above Question 3. Question : (TCO 2) Attributes represent the _____ of an object because they store information about that object. state behaviors size accessibility Question 4. Question : (TCO 2) If a programmer does not explicitly define a(n) _____, a default version will be provided by the compiler. destructor method constructor attribute All of the above Question 5. Question : (TCO 2) One of the ways object-oriented languages protect object data is through _____. integration of objects universal data access the public accessor encapsulation All of the above Question 6. Question : (TCO 2) Which of the following symbols indicate(s) level of access for both attributes and methods in a class. + * ++ & All of the above
Question 7. Question : (TCO 2) Object-oriented classes should be designed with the concept of a black box in mind. This means that users of the class should only need to know what _____ and _____ are associated with the class. The actual implementation details need not be known. interface; implementation inputs; outputs objects; accessors relationships; interfaces Question 8. Question : (TCO 2) One of the benefits of _____ is that it allows the implementation of a class to change without affecting external entities using that class. abstraction encapsulation instantiation construction Question 9. Question : (TCO 2) Which of the following is a proper implementation for a getter? int getAge() { return age;} void getAge() {return age;} int getAge(int newAge) {this.age = newAge;} void getAge() {return age;} Question 10. Question : (TCO 2) Identify the attribute declaration(s) below that most likely contribute to the concept of information/data hiding. private string name; private name; string private name; string name; None of the above CIS 247 DeVry Week 4 Quiz Latest 1. Question : (TCO 3) Which statement is true regarding the principles of an object-oriented language? Persistence is not an optional object-oriented language requirement. All methods should be public when declare inside a class. Encapsulation means hiding data in a class from other classes. Class attributes should be global so all elements of the program can see them. Question 2. Question : (TCO 3) When would a programmer write more than one constructor? You never have more than one constructor
The constructor cannot be overloaded So objects can be treated the same way as variables of built in data types None of the above Question 3. Question : (TCO 3) Which of the following might be potential class(es) in an application? Checking Account Customer Deposit A and B None of the above Question 4. Question : (TCO 3) Why do classes need to collaborate with each other? Most classes do not exist in isolation. Classes need to interact with other classes to exchange data. None of the above Both A and B Question 5. Question : (TCO 3) Assume you have an Employee class with a non-static attribute named salary. If you create ten objects of this class, how many copies of the salary variable will you have? 2 10 An unlimited number None of the above Question 6. Question : (TCO 3) What does SOW stands for in the object-oriented design process? Sequence of work Structure of work Statement of work None of the above Question 7. Question : (TCO 3) In the object-oriented design process, which of the following is true? The cost of a design change in the implementation phase is very low. The cost of a requirement/design change in the design phase is very high. The cost of a design change after the deployment phase is astronomical . All of the above None of the above Question 8. Question : (TCO 3) To _____ an object is to create it. instantiate encapsulate abstract
overload Question 9. Question : (TCO 3) Every object of the same class _____. gets a copy of every instance variable only gets a copy of every instance variable and method gets a copy of every method only None of the above Question 10. Question : (TCO 3) Classes do not have the ability to _____. encapsulate data. enforce information hiding contain both data and functions know how other classes are implemented CIS 247 DeVry Week 5 Quiz Latest 1. Question : (TCO 3) Which of the following is/are the mechanism(s) for code reuse? Inheritance Composition Inheritance and composition None of the above Question 2. Question : (TCO 4) Which of the following is true about inheritance? Child classes are more generalized than their associated parent classes. Inheritance demonstrates the generalization/specialization relationship. Parent classes are more specialized than their associated child classes. Parent classes contains more functionality than child classes. Question 3. Question : (TCO 4) Select the parent class. Barking Dog Yodeling Dog Golden Retriever Dog Question 4. Question : (TCO 4) Which of the following is not a good example of a hierarchy that could be modeled by inheritance? Airplanes Geometric shapes Animals Prime numbers
Question 5. Question : (TCO 4)Which of the following examples represent(s) the “is-a” relationship in the parent/child format? dog/cat rectangle/circle checking account/saving account None of the above Question 6. Question : (TCO 3) What is/are the reason(s) to use inheritance? Labor division Introducing modularity into program Reusing design All of the above Question 7. Question : (TCO 3) If class B is inherited from class A, which of the following statements is true? Class A has access to the methods and fields of class B. Class A has access to the methods and fields of class B and class B’s subclasses. Class B does not have access to the methods and fields of class A. Class B has access to the methods and fields of class A. Question 8. Question : (TCO 4) Which accessibility modifier is most general? Private Default Public Protected Question 9. Question : (TCO 4) Which of the following refers to a class that inherits from a parent class? Child classes Derived classes Subclass classes All of the above Question 10. Question : (TCO 6) Which of the following are benefits of using inheritance? Smaller chance of errors Ease of use for users of class Time saving All of the above CIS 247 DeVry Week 6 Quiz Latest
1. Question : (TCO 7) An instance of an abstract class can be created using _____. the new operator encapsulation a public accessor None of the above Question 2. Question : (TCO 7) An abstract _____ is used only to form related subclasses using inheritance since it cannot be instantiated. method class object attribute Question 3. Question : (TCO 7) Which of the following statements is false? An abstract method is a method signature without a method body and can be found in an abstract class. If a subclass extends an abstract base class, the subclass must implement the abstract method(s) from the base class, or else call itself abstract also. Any method in an abstract class is considered an abstract method. Abstract methods are inherited. Question 4. Question : (TCO 7) Which of the following classes is most likely an abstract class? Vehicle Blue Spruce Hand Saw Goldfish Question 5. Question : (TCO 7) In terms of object-oriented programming, a(n) _____ is a mechanism that forces a programmer to adhere to specific rules when developing an application. contract base class requirements analysis method signature None of the above Question 6. Question : (TCO 7) _____ and _____ can contain abstract methods. Abstract classes; base classes Abstract classes; interfaces Interfaces; base classes None of the above
Question 7. Question : (TCO 7) Multiple inheritance is defined as the ability to do what? Identify multiple superclasses for a single class Create multiple subclasses from a single superclass Override multiple methods in a base class Overload multiple superclasses for a single class Question 8. Question : (TCO 7) Which of the following class definitions defines a legal abstract class? class abstract Dog { void grow(); } public abstract class Dog { void eat (){} } abstract private class Dog { void eat (); } public class abstract Dog { void eat (){} } Question 9. Question : (TCO 7) Which of the following declares an abstract method in an abstract Java class? public abstract calc(); public abstract void calc(); public void calc() {} public void abstract calc(); Question 10. Question : (TCO 7) Which of the following statements is true? Interfaces contain a list of already implemented methods. Interfaces contain a list of pre-defined attributes with default values . All methods defined in an interface must be implemented by any class that chooses to implement the interface. At least one of the methods defined in an interface must be implemented by any class that chooses to implement the interface.