/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} Free solutions & answers for C# Programming: From Problem Analysis to Program Design Chapter 4 - (Page 1) [step by step] | 91Ó°ÊÓ

91Ó°ÊÓ

Problem 1

Objects are instances of _______________ . a. data members b. parameters c. properties d. methods e. classes

Problem 4

Which of the following identifiers follows the standard naming convention for naming a class? a. Calculate Final Grade b. MilesPerGallon c. Students d. Reports e. Employee

Problem 6

Which of the following is one of the user-defined classes inherited from the object class? a. ToString( ) b. Main( ) c. CalculateAvg( ) d. EqualsHashCode( ) e. TypeHashCode( )

Problem 8

Which of the following is a valid overloaded method for CalculateAvg( )? intÆ’CalculateAvg(intÆ’val1,Æ’intÆ’val2) a. void CalculateAvg(int val1, int val2) b. int CalculateAvg(int val1, int val2) c. int CalculateAvg(double val1, double val2) d. double CalculateAvg(int val1, int val2) e. int CalculateAverage(int val2, int val1)

Problem 9

What operator is used to instantiate the class a. method b. plus symbol c. ToString( ) d. new e. equal symbol

Problem 10

Instance variables are the same as: a. private member data b. local variables c. properties d. arguments e. parameters

Problem 11

Given the Employee class shown below, which of the following would be the most appropriate heading for its default constructor? public classÆ’EmployeeÆ’{ a. public void Employee( ) b. public Employee( ) c. public static Employee( ) d. private void Employee( ) e. private Employee( )

Problem 12

The following is probably an example of a _________ public doubleÆ’GetYards(Æ’) a. constructor b. mutator c. property d. accessor e. class definition

Problem 14

Which of the following would be a valid call to the default constructor for the following class? public classÆ’EmployeeÆ’{ a. Employee employee1 = new Employee( ); b. Employee employee1= new undergrad( ); c. Employee employee1; d. Employee employee1= new Employee(default); e. Not enough information is given to be able to answer.

Problem 15

Given the following class definition, what would be a valid heading for a mutator? public classÆ’Student{ private stringÆ’name; private doubleÆ’gpa;} a. public double SetGpa(double gpaValue) b. public void SetGpa(double gpaValue) c. public double SetGpa( ) d. public void GetGpa(double gpaValue) e. public double SetGpa( )

Access millions of textbook solutions in one place

  • Access over 3 million high quality textbook solutions
  • Access our popular flashcard, quiz, mock-exam and notes features
  • Access our smart AI features to upgrade your learning
Access millions of textbook solutions in one place

Recommended explanations on Computer Science Textbooks