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
tatyana61 [14]
3 years ago
9

What are the design concepts and assumptions behind a class, an object and the relationship between them? What are the roles met

hods and static fields play in OOP?
Computers and Technology
1 answer:
Triss [41]3 years ago
8 0

Answer:

Object-oriented programming (OOP) is a procedural language and based on classes associated with an object. Without classes and object relationship OOP is not possible. According to program's design concept classes provide abstraction and encapsulation with the help of object. Object have states and behaviors like cat has states like name, color and  cat has also behaviors like  wagging the tail, eating, jumping etc. A class forms template or blueprints for these states and behaviors because different cats have different behaviors and states.

Methods provide a way for encapsulation and accessing private class members with public methods and static fields are sometimes best alternative for global variable. We can use static field when it same for all and shared by all objects of that class and it can save memory because we do not have to initialize it for each object

You might be interested in
In both direct flooding attacks and _____ the use of spoofed source addresses results in response packets being scattered across
Natali5045456 [20]

Answer:

SYN spoofing attacks.    

Explanation:

The Spoofing attack is used to access the personal information it is distributed the  viruses through infected links or file .The spoofing attacks has redistributed the traffic and the flow control in the denial-of-service attacks.

The SYN spoofing attacks is used the spoofed source in the result of giving response to packet The Spoofing attack  is distributed  across the Internet also it is detectable

6 0
3 years ago
What your computer can do to you?
hjlf

Answer:

it can blind you because too much light in ur face is bad

Explanation:

6 0
3 years ago
Read 2 more answers
Bob's Assembly is a hardware manufacturer. It specializes in builders' hardware for doors, cabinets, windows, and bathrooms. Bob
Snezhnost [94]

Answer:

distinctive competence

Explanation:

The distinctive competence denotes the various characteristic of certain business on which behalf that business perform better than its competitors. And since the business succeeds in doing those things better than its competitors, that business gains a competitive advantage over its competitors. And here, Bob's assembly is a hardware manufacturer for the doors, cabinets, windows and the bathrooms. And his assembly products are more durable and economical than its competitor's products. And thus Bob has a competitive advantage over its competitors.

3 0
4 years ago
Given ProblemSolution class. Use a pointer to object of "ProblemSolution" class to invoke the "CalculateSum" and "Print" methods
faltersainse [42]

Answer:

#include <iostream>

using namespace std;

class  ProblemSolution {

private:

int num1, num2;

public:

ProblemSolution(int n1, int n2) {

 num1 = n1;

 num2 = n2;

}

int calculateSum() {

 int sum = 0;

 sum = num1 + num2;

 return sum;

}

void printSum() {

 // calculateSum will return sum value that will be printed here

 cout <<"Sum = "<< calculateSum();

}

~ProblemSolution() {

 cout << "\nDestructor is called " << endl;

};

};

int main() {

int a, b;

cout << "Enter a: ";

cin >> a;

cout << "Enter b: ";

cin >> b;

// Initiallizing object pointer of type ProblemSolution

ProblemSolution *objPtr = new ProblemSolution(a,b);

// printing Sum

objPtr->printSum();

// delete objPtr to relaease heap memory :important

delete objPtr;

return 0;

}

Explanation:

we will initialize  a pointer "objPtr" and initallize the constructor by passing 2 values a and b followed by the keyword  "new". the keyword "new" allocates memory in the heap. we can access class member functions using arrow "->". it is important to delete objPtr at the end of the program so that the heap memory can be freed to avoid memory leakage problems.  

3 0
3 years ago
Select all that apply.
Leto [7]
You may do all of the given options.
Thank You!
8 0
4 years ago
Other questions:
  • What was the benefit of a caloytpe over a daguerreotype
    6·2 answers
  • Nathan, a civil engineer in a construction company, is one of the best performers in the organization. He is assigned challengin
    9·1 answer
  • Bullet points on a slide should be limited to _____. 2 4 8 10
    15·2 answers
  • Bill needs to make a presentation in which he has to represent data in the form of a pyramid. Which feature or menu option of a
    10·2 answers
  • What are the basic components of a Production System?
    6·1 answer
  • The company currently runs 60 autonomous APs and has plans to increase wireless density by 50% in the near future
    13·1 answer
  • Question 1
    10·1 answer
  • What is one example of an emerging class of software
    12·1 answer
  • Iam trying to find a way to code in Scratch that will let me take away the first two and last two letters of a word. For example
    15·1 answer
  • How to do the for loop in python
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!