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
anastassius [24]
3 years ago
11

Why is a class called a factory of objects

Computers and Technology
1 answer:
zhenek [66]3 years ago
4 0

Explanation:

A class is called an object factory because objects are created from a class. An object is an instance of a class.

You might be interested in
Write a C++ program that reads from the standard input and counts the number of times each word is seen. A word is a number of n
Rufina [12.5K]

Answer:

#include <stdio.h>

#include <string.h>

#include <ctype.h>

 

struct detail

{

   char word[20];

   int freq;

};

 

int update(struct detail [], const char [], int);

 

int main()

{

   struct detail s[10];

   char string[100], unit[20], c;

   int i = 0, freq = 0, j = 0, count = 0, num = 0;

 

   for (i = 0; i < 10; i++)

   {

      s[i].freq = 0;

   }

   printf("Enter string: ");

   i = 0;

   do

   {

       fflush(stdin);

       c = getchar();

       string[i++] = c;

 

   } while (c != '\n');

   string[i - 1] = '\0';

   printf("The string entered is: %s\n", string);

   for (i = 0; i < strlen(string); i++)

   {

       while (i < strlen(string) && string[i] != ' ' && isalnum(string[i]))

       {

           unit[j++] = string[i++];

       }

       if (j != 0)

       {

           unit[j] = '\0';

           count = update(s, unit, count);

           j = 0;

       }

   }

 

   printf("*****************\nWord\tFrequency\n*****************\n");

   for (i = 0; i < count; i++)

   {

       printf("%s\t   %d\n", s[i].word, s[i].freq);

       if (s[i].freq > 1)

       {

           num++;

       }

   }

   printf("The number of repeated words are %d.\n", num);

 

   return 0;

}

 

int update(struct detail s[], const char unit[], int count)

{

   int i;

 

   for (i = 0; i < count; i++)

   {

       if (strcmp(s[i].word, unit) == 0)

       {

           s[i].freq++;

 

           return count;

       }

   }

   /*If control reaches here, it means no match found in struct*/

   strcpy(s[count].word, unit);

   s[count].freq++;

 

   /*count represents the number of fields updated in array s*/

   return (count + 1);

}

4 0
3 years ago
The sides of a ladder are called
adoni [48]

I think they are called stringers or rails.

3 0
3 years ago
Read 2 more answers
Amelia wants to create a website using the Python computer language to code her site. She will also use CodeSkulptor3 to help he
pishuonlain [190]

Amelia wants to create a website using the Python computer language to code her site. She will also use CodeSkulptor3 is an example of browser-based code editor. The correct option is A.

<h3>What is python?</h3>

Python is a programming language generally used to make websites and software.  Automated tasks and data analysis are also carried out using python.

CodeSkulptor3 is also a browser-based Python interpreter.  It has implemented a subset of Python 3.

Thus, CodeSkulptor3 is an example of browser-based code editor. The correct option is A.

Learn more about python.

brainly.com/question/19045688

#SPJ1

3 0
2 years ago
How does defragmentation improve performance?
KIM [24]

Answer:

Regularly running the Disk Defragmenter utility improves system performance. 

5 0
2 years ago
A speech why friends are important 2 min​
Gnoma [55]

Friends can challenge us, confuse us, and sometimes, we might wonder why we bother. But friendship is as important to our wellbeing as eating right and exercising. What’s more, friendships help us grow through each year of our lives.

The friends we meet in school teach us how to be patient, wait our turn, reach out, and try new hobbies. When we move into young adulthood we learn more about taking responsibility, finding a career path, and seeking out people as mentors.

As we continue into our 40s and beyond, we learn to weather the ups and downs in life, and once again friends provide a sounding board and place for us to grow. Friendship is key to our success with all our relationships and it can create a sense of purpose in our lives.

The people we bring into our lives as friends will show us how to forgive, laugh, and make conversation. The basic components of any relationship, from our marriage to our coworkers, are all founded in friendship. We learn how to interact with people because of our friends, even the ones that are opposite from us or share a different worldview.

We don’t just talk with others but learn from them. We understand the process of meeting new acquaintances and finding out what makes them tick. These people help push us out of our comfort zones while still providing a safe emotional space for us to be totally ourselves.

One of the most overlooked benefits of friendship is that it helps keep our minds and bodies strong. In fact, it’s as important to our physical health as eating well and keeping fit. A recent Harvard study concluded that having solid friendships in our life even helps promote brain health.

4 0
2 years ago
Other questions:
  • Why does air have weight?
    6·2 answers
  • Yuri is a skilled computer security expert who attempts to break into the systems belonging to his clients. He has permission fr
    5·1 answer
  • To save your new document or presentation, click the Start Button
    10·1 answer
  • Which is a common problem for inserting pictures into placeholders?
    10·1 answer
  • The function below takes two numeric parameters. The first parameter specifies the number of hours a person worked and the secon
    13·1 answer
  • Develop a C program that calculates the final score and the average score for a student from his/her (1)class participation, (2)
    12·1 answer
  • Write a program to play an automated game of Rock, Paper, Scissors. Two players make one of three hand signals at the same time.
    9·1 answer
  • If you do a Find and Replace for a term, where will Word begin looking for the term?
    6·1 answer
  • Difine Mainframe Computer~<br><br><br><br><br><br><br><img src="https://tex.z-dn.net/?f=%20%5C%3A%20%20%5C%3A%20" id="TexFormula
    12·2 answers
  • You are planning to depart on a flight from area 2 to area 4 in 12 hours. What weather is forecast to occur along your route?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!