QUESTION 4 Given the StaffMember class shown below, which of the following would
ID: 3723341 • Letter: Q
Question
QUESTION 4
Given the StaffMember class shown below, which of the following would be the most appropriate heading for its default constructor?
public class StaffMember {
public void StaffMember( )
public StaffMember( )
static StaffMember( )
private void StaffMember( )
private StaffMember( )
QUESTION 11
If you follow the standard C# naming conventions, the property name for the following instance variable would be:
private string name;
propertyName
nameProperty
getName
name
Name
QUESTION 1
Normally, as it relates to access mode, we usually specific_______ access for data members,________ access for methods,_________ access for constructors_____________ access with properties and___________ access for classes for object-oriented solutions.
QUESTION 2
For a class called Account that has data members of accountNumber and balance, which would be the most appropriate instance method heading for a method that subtracts the transaction amount from the balance and stores the result in the balance field?
static void ReduceAccount(double transactionAmount)
void ReduceAccount(double transactionAmount)
ReduceAccount( )
void ReduceAccount( )
void ReduceAccount(transactionAmount )
QUESTION 5
An additional constructor could be written for the Door class. The signature for the constructor would be _________________. HINT: Recall the signature for a method includes it's name and the data type(s) for its parameters.
public void StaffMember( )
public StaffMember( )
static StaffMember( )
private void StaffMember( )
private StaffMember( )
Explanation / Answer
QUESTION 4
Answer:
public StaffMember( )
QUESTION 11
Answer:
Name
QUESTION 1
Answer:
Normally, as it relates to access mode, we usually specific____private___ access for data members,____public____ access for methods,___public______ access for constructors________public_____ access with properties and______public_____ access for classes for object-oriented solutions.
QUESTION 2
Answer:
void ReduceAccount(double transactionAmount)
QUESTION 5
Answer:
public Door(string name)