Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 1: The following is probably an example of a(n): public double GetYards

ID: 3722507 • Letter: Q

Question

Question 1:

The following is probably an example of a(n):
public double GetYards( )

constructor

mutator

property

accessor

class definition

Question 2:

Instance variables are the same as:

private member data

local variables

properties

arguments

parameters

Question 3:

Instance variables are the same as:

private member data

local variables

properties

arguments

parameters

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 5:

What operator is used to instantiate the class?

method

plus symbol

ToString( )

new

equal symbol

Question 6:

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 )

constructor

mutator

property

accessor

class definition

Question 2:

Instance variables are the same as:

private member data

local variables

properties

arguments

parameters

Question 3:

Instance variables are the same as:

private member data

local variables

properties

arguments

parameters

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 5:

What operator is used to instantiate the class?

method

plus symbol

ToString( )

new

equal symbol

Question 6:

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 )

Explanation / Answer

1)Answer:

accessor

Explanation:

An example of a(n) accessor is public double GetYards( )

2)Answer:

private member data

Explanation:

Instance variables are the same as private member data

3)Answer:

private member data

Explanation:

Instance variables are the same as private member data

4)Answer:

public StaffMember( )

5)Answer:

new

Explanation:

new operator is used to instantiate the class.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote