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
creativ13 [48]
3 years ago
14

Suppose you are working on a team using object-oriented programming, and your supervisor observes you creating new objects. She

tells you there is an easier way to create objects by making copies. What is your supervisor teaching you?
Computers and Technology
1 answer:
o-na [289]3 years ago
3 0
The correct way to observe and create something
You might be interested in
Which of the following is a good technique to use when driving in an urban environment
nadya68 [22]

Answer:

A. Passing

Explanation:

Passing is a good technique to use when driving in an urban environment .

5 0
3 years ago
Read 2 more answers
(5 points) Create a user-defined data structure (i.e., struct) called Point that represents a two-dimensional Cartesian coordina
Harlamova29_29 [7]

Answer:

Here is the C++ program:

#include<iostream>  //to use input output functions

#include <math.h>  //to use sqrt and pow function

#include<iomanip>  //to use setprecision

using namespace std;   //to identify objects cin cout

struct Point  {  // structure name

float x,y;  // member variables

};  

float calculateDistance (Point a, Point b)  {  //function that that takes two parameters of type Point

float distance;  //stores the distance between two points

distance=sqrt(pow(a.x-b.x,2)+pow(a.y-b.y,2));  //formula to compute distance between two points

return distance;  }  //returns the computed distance

int main()  {  //start of main function

Point p1,p2;  //creates objects of Point

cout<<"Enter point 1 coordinates: "<<endl;  //prompts user to enter the value for coordinates of first point

cin>>p1.x;  //reads input value of x coordinate of point 1 (p1)

cin>>p1.y;  //reads y coordinate of point 1 (p1)

cout<<"Enter point 2 coordinates: "<<endl;  //prompts user to enter the value for coordinates of second point

cin>>p2.x;  //reads input value of x coordinate of point 2 (p2)

cin>>p2.y;  //reads y coordinate of point 2 (p2)

cout<<"The distance between two points is "<<fixed<<setprecision(2)<<calculateDistance(p1,p2);} //calls function by passing p1 and p2 to compute the distance between p1 and p2 and display the result (distance) up to 2 decimal places

Explanation:

The program has a structure named Point that represents a two-dimensional Cartesian coordinate (x, y). The member variables of this struct are x and y, which are both floating-point values. A function called calculateDistance takes two parameters, a and b of type Pointer and returns the distance between the two given points using formula:

\sqrt{(x_{2}-x_{1} )^{2} +(y_{2}-y_{1} )^{2}  }

It uses pow function to compute the power of 2 and sqrt function to compute the square root.

Then in main() method the program prompts the user to enter coordinates for two points and calls calculateDistance method to compute the distance between two points and display the result up to 2 decimal places using setprecision(2).

The program along with the output is attached in a screenshot.

6 0
3 years ago
Help, with gaming unlocked
Leto [7]

Answer:

C. empathic understanding

8 0
4 years ago
What type of memory or storage device is prone to losing data if the power goes out?
Veseljchak [2.6K]
The answer is (c.) a DDR SDRAM module.

DDR SDRAM stands for Double data rate synchronous dynamic random-access memory. It is a form of temporary data storage in a computer. So when it comes to power down, the data stored in this RAM is most likely to lose.
7 0
3 years ago
Suppose an AI scientist designed a robot to ring an alarm for food. If the clock strikes 1, the robot displays a message “Time f
Rudik [331]

Suppose an AI scientist designed a robot to ring an alarm for food. If the clock strikes 1, the robot displays a message “Time for lunch.” It displays such messages at breakfast and dinnertime, too. What kind of agent is the robot?

A. model-based reflex agent

B. goal-based agent

C. utility-based agent

D. simple reflex agent

4 0
2 years ago
Read 2 more answers
Other questions:
  • Which sentences in the passage show the preventive measures to avoid data breach?
    9·1 answer
  • Which of the following is a valid SQL statement? a. c.customer#, order#, orderdate, shipdate FROM customers c NATURAL JOIN order
    13·1 answer
  • Which of the following keys on a keyboard allows you to select multiple cells located in different parts of your worksheet?
    13·2 answers
  • __________ has become a widely accepted evaluation standard for training and education related to the security of information sy
    5·1 answer
  • Question 1
    14·2 answers
  • Rachelle's computer has frequent system crashes and it takes a long time to access files and folders. What hardware component is
    8·1 answer
  • What does CRM stand for?
    10·1 answer
  • In the early days of computer technology, which system was justified because data-processing personnel were in short supply, har
    6·1 answer
  • What is the most likely to be a possible physical attack?
    7·2 answers
  • You are the project manager of the SZ203 Printer Driver Project for your organization. A new change request has been
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!