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
prohojiy [21]
3 years ago
12

C++ code pls write the code

Computers and Technology
1 answer:
Mariana [72]3 years ago
6 0

Answer:

Following are the code to this question:

#include<iostream>//defining header file

using namespace std;

class vec//defining class vec  

{

int x, y, z; //defining integer varaible x, y, z

public: // using public access specifier

vec() //defining default constructor

{

   x = 0; //assign value 0 in x variable  

   y = 0; //assign value 0 in y variable

   z = 0;//assign value 0 in z variable

}

vec(int a, int b , int c) //defining parameterized constructor vec

{

   x = a; //assign value a in x variable

   y = b; //assign value b in y variable

   z = c;//assign value c in z variable

}

void printVec() //defining a method printVec

{

   cout<<x<<","<<y<<","<<z<<endl; //use print method to print integer variable value

}

//code

vec& operator=(const vec& ob) //defining operator method that create object "ob" in parameter  

{

x=ob.x; //use ob to hold x variable value

y=ob.y;//use ob to hold y variable value

z=ob.z;//use ob to hold z variable value

return *this;//using this keyword to return value  

}

};

int main()//defining main method

{

vec v(1,2,3);//calling parameterized constructor

vec v2; //creating class object to call method

v2=v; //creatring reference of object

v2.printVec(); //call method printVec

return 0;

}

Output:

1, 2, 3

Explanation:

In the above-given code part, a method "operator" is defined, that accepts an object or we can say that it is a reference of the class "ob", which is a constant type. Inside the method, the object is used to store the integer variable value in its variable and use the return keyword with this point keyword to return its value.    

You might be interested in
Write a detailed three page report that summarizes how data scientists are utilizing data mining to predict future trends and be
LiRa [457]

Answer: given in the explanation

Explanation:

Data mining is referred as an automated processing tool used for sorting and analyzing enormous data and information which indeed are ``aimed towards effectively identifying trends and patterns and establishing relationships to solve business problems and generate new opportunities. Furthermore data mining techniques also helps to predict what’s going to happen in the future and act accordingly to take benefit of forthcoming tendencies.

Data mining is applied to a variety of large-scale data-processing activities such as collecting, extracting, warehousing and analyzing data. It also includes decision-support applications and technologies such as business artificial intelligence and machine learning and is used in varied areas of business research such as product development, sales and marketing etc.

Data mining is for taking advantage of data to predict ;

  • Mathematical algorithms, and, data are used for predictive analytics. One can capture information, and, use it to model sales pattern, trends, and, customer behaviour
  • Data mining uses algorithms to extract, and, analyze information; discover hidden patterns
  • It uses data patterns, and, is thus closely tied to machine learning
  • Historical & current information is used to predict future trends

Data mining can be used for the following:

  • Data mining in gas & oil operations - Mining data in gas & oil operations involves committing to key technologies, and, processes; and, embracing new ways of thinking & problem-solving. Firms can use exploratory data analysis, modelling techniques & model development; approaches to put models into production
  • Big data - Performance computing & advanced analytics
  • Magic Quadrant - Evaluate 16 vendors to identify the right ones
  • Heavy reading, network analytics - Optimize network; evaluate network performance; provide targeted marketing; fine-tune capacity.

5 0
4 years ago
Which remarketing audiences can be defined in google analytics? (select all that apply)?
Harman [31]
<span>The remarketing audiences that can be defined in google analytics are :      </span><span>
1) Users who played a video on your website
2) Users who purchased a product on your website
</span>3) Users who visited a specific page on your website
3 0
3 years ago
Which extension is appropriate for Word document templates?
Ronch [10]

Answer:

<em><u>DOCX pretty sure</u></em>

<em><u /></em>

<em><u>hope that this helps :)</u></em>

<em></em>

5 0
3 years ago
Read 2 more answers
A "want" is very different than a "need'. What is a want?
Snowcat [4.5K]
I miss read the question the first time....the answer is C.
8 0
4 years ago
Read 2 more answers
Jamie Lee is beside herself knowing that the thieves had unauthorized use of her debit/ATM card. What is Jamie's financial respo
Rama09 [41]

Jamie's financial responsibility for the unauthorized use is dependent on how fast she report the theft of her debit/ATM card.

Since Jamie Lee is dealing with an unauthorized use of  her ATM or debit card,  she ought to  act quickly so as  to avoid full liability for unauthorized charges since her card was stolen.

According to Federal laws and bank policies, Under the Federal Electronic Fund Transfer Act, the following  liability applies:

  •  $0 if she  reports the theft of the card immediately before any unauthorized charges are made.
  • She would be charged up  to $50 if she  notifies  the bank within two business days after she  realized the theft.
  • She would be charged up to $500 if she fails to notify the bank within two business days after the theft  but does notify the bank within 60 days after her  bank statement is mailed to her with a list of  the unauthorized withdrawals.
  • She wold be charged unlimited charges if she  fails to notify the bank within 60 days after her bank statement is mailed to her listing the unauthorized withdrawals.

From the polices applicable, It is necessary that Jamie Lees  notifies the bank or card issuer of the theft as soon as possible so as not to incur much financial responsibilites for the unauthorised use.

Read on to learn about  unauthorized use debit/ATM card: brainly.com/question/21485510

8 0
2 years ago
Other questions:
  • _ are typically comprised of a mix of _ and _
    11·2 answers
  • Which tool relies on the logged on user's certificate details to encrypt or decrypt files and folders? powershell bitlocker encr
    12·1 answer
  • A good example of an agency relationship in a hotel is the relationship between a bartender and a server. True False
    6·1 answer
  • Assume v is a vector of integers that has been declared and initialized. Write a statement that adds the value 42 to the vector.
    14·1 answer
  • Your S3 backed website is consistently receiving over 400 read requests per second and is steadily rising. What can you do to ac
    14·1 answer
  • Weak Induction
    8·1 answer
  • Write a function:
    13·1 answer
  • When should students practice netiquette in an online course? Check all that apply.
    9·1 answer
  • When is the next Great Conjunction between Jupiter and Saturn?​
    13·1 answer
  • A start-up employs interns. The following details of interns are stored
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!