1 / 3

CIS 247 DEVRY WEEK 2 QUIZ LATEST

<br>Visit Below Link, To Download This Course:<br><br>https://www.tutorialsservice.net/product/cis-247-devry-week-2-quiz-latest/<br><br>Or <br>Email us on<br>SUPPORT@TUTORIALSSERVICE.NET<br><br>CIS 247 DeVry Week 2 Quiz Latest<br>CIS247<br>CIS 247 DeVry Week 2 Quiz Latest<br>1. Question : (TCO 2) Only those class members which are part of the interface of the class should be declared as _____.<br>• open<br>• banned<br>• private<br>• public<br>

Download Presentation

CIS 247 DEVRY WEEK 2 QUIZ LATEST

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CIS 247 DEVRY WEEK 2 QUIZ LATEST Visit Below Link, To Download This Course: https://www.tutorialsservice.net/product/cis-247-devry-week-2-quiz-latest/ Or Email us on SUPPORT@TUTORIALSSERVICE.NET CIS 247 DeVry Week 2 Quiz Latest CIS247 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   

  2. 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

  3. 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

More Related