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
lora16 [44]
3 years ago
7

Match the context details with the pattern that applies.

Computers and Technology
1 answer:
tia_tia [17]3 years ago
6 0

Answer:

1. - Observer

2. - iterator

3. - strategy

4. - composite

5. - decorator

Explanation:

An object contains other objects (elements) and must give access to them for clients, without exposing its internal structure. This is an observation.

The subject-object can generate events as an iterable (iterator) and could use different strategic algorithms to achieve a task. Class objects can be used to aggregate other class objects.

In python, the decorator function mimics the outer function of a nested function, but still maintains the functionality of the second function

You might be interested in
In mathematics, "quadrant I" of the cartesian plane is the part of the plane where x and y are both positive. Given a variable,
lbvjy [14]

Answer:

#include <iostream>

using namespace std;

struct Cartesian {

double x;

double y;

};

int main() {

// creating a pointer p of type struct Cartesian

struct Cartesian *p = new Cartesian ;

cout << " Enter x: ";

// accessing the structure variable x by arrow "->"

cin >> p->x;

cout << "Enter y: ";

// accessing the structure variable y by arrow "->"

cin >> p->y;

// expression to check whether x and y lie in Quadrant 1

if (p->x > 0 && p->y > 0) {

 cout << "X and Y are in Quadrant 1 ";

}

else

{

 cout << "x And y are not in Quadrant 1";

}

// deleting the struct pointer p

delete p;

return 0;

}

Explanation:

in order to locate memory in heap, keyword "new" is used in C++ so,

struct Cartesian *p = new Cartesian ;

in order to access data members of the structure using pointer we always use an arrow "->". otherwise a dot oprerator is used to access data members.

in order to check whether x and y lie in 1st quadrent, we must use && operator in our if condition. so

if (p->x > 0 && p->y > 0)

&& will return true iff x and y both are +ve.

deleting the struct pointer p is important beacuse we are allocating memory in heap so heap memory should be used a resource and must be release when not needed otherwise it can cause memory leakage problems. so  

delete p;

5 0
3 years ago
Alicia uses a software application to store the names, email addresses, and phone numbers of her friends in alphabetical order. 
SpyIntel [72]

I think she's using Excel.

6 0
3 years ago
The prefix kilo stands for which one of the following values? A. 100 or 102 B. 1000 or 103 C. 1,000,000 or 106 D. 10,000 or 104
Jobisdone [24]
It means multiplying or dividing by 10, 100, 1000, etc
3 0
3 years ago
Read 2 more answers
When you write contracts, should you list many definitions at the start of the document?
aev [14]

Answer:

You can.

Explanation:

If you want you can, but usually as you cover topics you should list the definitions for each topic then instead of all at the beginning you do not want it to seem like it is a lot.  

4 0
3 years ago
Write a program that prompts the user to input two numbers, a numerator and a divisor. Your program should then divide the numer
12345 [234]
What language? JavaScript? Python?
8 0
3 years ago
Read 2 more answers
Other questions:
  • What auto-generated elements can be added to the header and footer? A. Charts and Images B. Theme and Font Selection C. Author a
    8·2 answers
  • To instruct Oracle11 g to sort data in ascending order, enter ____ after the column name in the ORDER BY clause.
    15·2 answers
  • What conclusion did Freud reach when attempting to understand the connection between psychological and physical problems?
    12·1 answer
  • A Windows application which demands a lot of raw processing power to execute repetitive complex calculations is a good candidate
    5·1 answer
  • All of the Internet in your country disappears. What happens next?
    13·1 answer
  • What are Manuscript signs​
    8·1 answer
  • You implement basic version control and go through the phase of creating a local repository. Initiate the commands to set up tha
    7·1 answer
  • Which of the following does Secure Sockets Layer (SSL) use to authenticate a user or system before encrypting a session?
    14·1 answer
  • Which of the following ""invisible"" marks represents an inserted tab?
    10·1 answer
  • 3 uses of a computer ​
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!