1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Zigmanuir [339]
3 years ago
7

If you have defined a class named SavingsAccount with a public static data member named numberOfAccounts, and created a SavingsA

ccount object referenced by the variable account20, which of the following will assign numberOfAccounts to numAccounts?
A) numAccounts = SavingsAccount.numberOfAccoun ts;B) numAccounts = numberOfAccounts;C) numAccounts = account20.numberOfAccounts;D) None of the above, you cannot reference a static data member.
Computers and Technology
1 answer:
Anvisha [2.4K]3 years ago
3 0

Answer:

numAccounts = SavingsAccount.numberOfAccounts

Explanation:

In object oriented programming, when you have created an object of class, you can create several instances (objects) from that class by referencing the className.classFeild. In this instance SavingsAccount is the class name and

numberOfAccounts is a feild (or data member). to create a new numAccount, we use the syntax as above in the answer

You might be interested in
Online platforms that allow users to represent themselves via a profile on a web site and provide and receive links to other net
Ksju [112]

Main Answer:<u> A Social networking service is an online platform that allow users to represent themselves via a profile and web site and provide and receive links to other network members </u>

Sub heding:

What is social networking service?

Explanation:

1.A social networking services is an online platform that allow users to represent themselves via a profile and web site and provide and receive links to other networks members

2.social networking services vary in format and the numbers of features

Reference link:

https//brainly.com

Hashtag:

#SPJ4

4 0
2 years ago
Write a method swaparrayends() that swaps the first and last elements of its array parameter. ex: sortarray = {10, 20, 30, 40} b
Alexus [3.1K]
In the C programming language, you can't determine the array size from the parameter, so you have to pass it in as an extra parameter. The solution could be:

#include <stdio.h>

void swaparrayends(int arr[], int nrElements)
{
int temp = arr[0];
arr[0] = arr[nrElements - 1];
arr[nrElements - 1] = temp;
}


void main()
{
int i;
int myArray[] = { 1,2,3,4,5 };
int nrElements = sizeof(myArray) / sizeof(myArray[0]);
swaparrayends(myArray, nrElements);

for (i = 0; i < nrElements; i++)
{
printf("%d ", myArray[i]);
}

getchar();
}

In higher languages like C# it becomes much simpler:

        static void Main(string[] args)
        {
            int[] myArray = {1, 2, 3, 4, 5};
            swaparrayends(myArray);
            foreach (var el in myArray)
            {
                Console.Write(el + " ");
            }

            Console.ReadLine();
        }

        static void swaparrayends(int[] arr)
        {
            int temp = arr[0];
            arr[0] = arr.Last();
            arr[arr.Length - 1] = temp;
        }

3 0
3 years ago
"En la opción
Katyanochek1 [597]
Answer: I think email

Explanation: not rlly sure tho..
5 0
2 years ago
what is happening when humans control the breeeding of living things to favor certain desired features
sweet-ann [11.9K]
Selective Breeding is happening.
6 0
3 years ago
What is the value of y when this code executes?
Cerrena [4.2K]

Answer:

The operation of 6*x only executes if x is greater or equal to 0, since x=-10 and -10 is less than 0, the operation does not execute. For this reason,  the value of y using this code is None.

Explanation:

In python a function is defined with the syntaxis:  

def function(x):  

the operation to execute (x)

value to return

In this case, the function is foo and the parameter is x:  

def foo(x):

  if x>= 0:

     return 6*x

The code starts by assigning a value to x. Then, the code asks if the value of x is grater or equal to 0, if this condition is meet, then the code returns the value of 6 times x, if not, then the code does not return a value. In this case, x is -10 and this value is not grater or equal to 0. Given that the condition is not met, then the code stops executing and the value of y is none.

4 0
3 years ago
Other questions:
  • A typical serial cable has
    13·1 answer
  • Computer maker Dell realized the problems with keeping large inventories, especially because of the fast rate of obsolescence of
    7·1 answer
  • _______________________ is a short-term program, typically 30 hours long, in which a therapist, social worker, or trained probat
    5·1 answer
  • This question is for one of my classes I am in right now, and the question is:
    8·1 answer
  • What does the % find?
    9·2 answers
  • Select the correct answer.
    12·1 answer
  • A jackhammer uses pressurized gas to transmit force to the hammer bit. What type of mechanical system is it?
    13·1 answer
  • When Creating a FPS game what basic rules would you add?
    12·1 answer
  • Since the rules cannot address all circumstances, the Code includes a conceptual framework approach for members to use to evalua
    8·1 answer
  • Match each item with a statement below. - A popular port scanners that has the ability to use a GUI front end - Allows you to pi
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!