Write a class with name shares shares( ) constructor to initialize the object shares(String , int , int ) constructor to initialize the object void buy( ) for buying the shares void sell( ) for selling the shares calc( ) to calculate the total value of shares show( ) to show the details. Note : buy( ) and sell( ) functions will increase or decrease the number of shares, and accordingly the Total value of shares will change. Create another class and write main( ) function and use the above functions....use : string nm(name of buyer)
int no(no. of shares)
int unitprc(price of 1 share)
int totalval (total value of all shares)

Answers

Answer 1

Explanation:

What is constructor?

Constructor is a member function of class, whose name is same as the class.

A constructor is a special type of member function of a class which initializes objects of a class. In C++, Constructor is automatically called when object(instance of class) is created.

Constructor is invoked at the time of object creation. It constructs the values i.e. provides data for the object that is why it is known as constructors.

Constructor does not have a return value, hence they do not have a return type.


Related Questions

Mrs. Ferrar is an older woman with a limited income. Which programs and services may assist her with obtaining healthy meals and becoming more physically active? check all that apply

Answers

The programs and services that may assist her with obtaining healthy meals and becoming more physically active are:

1. food stamps or SNAP

2. food banks

5. community parks

6. community gardens

What are food stamps?

A food stamps is known to be a kind of voucher that is often issued very cheap by the state for low income and it is often exchangeable for food.

Note that The programs and services that may assist her with obtaining healthy meals and becoming more physically active are:

1. food stamps or SNAP

2. food banks

5. community parks

6. community gardens

See options below

food stamps or SNAP

food banks

WIC

NSLP

community parks

community gardens

Learn more about food stamps from

https://brainly.com/question/1085704

#SPJ12

The iso 14001:2004 standards require documentation of a firm's environmental program. Which component requires a plan to improve performance in resource use and pollutant output?

Answers

The component that requires a plan to improve performance in resource use and pollutant output is the environmental management system.

What is a pollutant?

Pollutant simply means a substance that is harmful to the environment.

In this case, the component that requires a plan to improve performance in resource use and pollutant output is the environmental management system.

Learn more about pollutant on:

brainly.com/question/25537936

#SPJ12

why blu rays store more data than dvd

Answers

A Blu-ray disk stores more data than DVD because it uses a blue laser that has a shorter wavelength (405 nm) rather than a red laser (650 nm).

What is a Blu-ray disk?

A Blu-ray disk can be defined as a high-capacity optical disk storage medium that is designed and developed by Sony, Blu-ray Disc Association, so as to record (store), rewrite and play back high definition (HD) video formats.

Based on scientific information, the reason why a Blu-ray disk stores more data than DVD is simply because it uses a blue laser that has a shorter wavelength (405 nm) rather than a red laser with a wavelength of 650 nm used on DVDs.

Read more on Blu-ray disk here: https://brainly.com/question/26699008

#SPJ12

at the data link layer, which type of network address is used to identify the receiving node?

Answers

Answer:

MAC address

Explanation:

The MAC address is a local 48 bit address that is unique to every device. It is found at the Data link layer unlike IP address that is found at the Network layer, the MAC address will not change.

The MAC address, type of network address is used to identify the receiving node.

What is A MAC address?

This is known to be a kind of physical address that is often given to each network adapter in a computer, or any kind of mobile device.

This is made up of twelve hexadecimal characters and as such, The MAC address, type of network address is used to identify the receiving node.

Learn more about MAC address  from

https://brainly.com/question/13267309

#SPJ11

What are the main differences between openldap and microsoft's active directory (ad)? check all that apply

Answers

The main differences between openldap and microsoft's active directory are:

Open LDAP works on any OS, AD does not.Open LDAP is open-source, AD is not.

What is the openldap and microsoft's active directory?

The LDAP is known to be a kind of an open, vendor-agnostic that functions  with a lot of directory services, such as AD. AD but Microsoft's proprietary directory service is known to often put together a lot of IT assets like computers and its users.

Therefore, The main differences between openldap and microsoft's active directory are:

Open LDAP works on any OS, AD does not.Open LDAP is open-source, AD is not.

Learn more about  active directory from

https://brainly.com/question/24215126

#SPJ12

what is microprocessor ? Why does a computer need microprocessor? Why does a computer need microprocessor ?​

Answers

Answer:

A microprocessor is a computer processor where the data processing logic and control is included on a single integrated circuit. A computer need microprocessors to perform the functions of a computer's central processing unit.

An organization with a(n) _____ structure, sometimes called a "franchiser," uses highly centralized information systems

Answers

An organization with a global structure, sometimes called a "franchiser," uses highly centralized information systems to perform its tasks.

What is an information system?

An information system refers to a set of computer systems that is primarily used by an organization to obtain, store, and process data, including the dissemination of information, knowledge, and the distribution of digital products from one geographical location to another.

Basically, an organization with a global structure, which is sometimes referred to as a "franchiser," make use of highly centralized information systems to perform its tasks.

Read more on information here: brainly.com/question/25885448

#SPJ12

when connecting to a wireless local area network (wlan), what is the most important fact about the service set identifier (ssid)?

Answers

The most important fact about the service set identifier (SSID) is that all the end users and all access points (AP) must be configured with matching SSIDs.

What is SSID?

SSID is an acronym for service set identifier and it can be defined as the generic name given to a wireless local area network (WLAN) connection.

In Computer networking, the most important fact about the service set identifier (SSID) is that all the end users and all access points (AP) must be configured with matching SSIDs.

Read more on wireless local area network here: https://brainly.com/question/13697151

#SPJ11

what does the asterisk (*) after select tell the database to do in this query?

Answers

In the case above, The asterisk helps database or tell it to select all data that meets the criteria as stated in the query.

What does asterisk (*) mean in SQL?

The term means all columns. Note that The asterisk or star symbol ( * ) is a term that implies all columns in a given database.

Therefore, In the case above, The asterisk helps database or tell it to select all data that meets the criteria as stated in the query.

Learn more about asterisk from

https://brainly.com/question/1620017

#SPJ11

you have a windows server 2016 system that you want to use as a dhcp relay agent. which windows server 2016 service would you use to do this?

Answers

You should use Routing and Remote access of the Windows server 2016 service to make the computer system act as a DHCP relay agent.

What is a server?

A server can be defined as a dedicated computer system that is designed and developed to provide specific services to other computer devices or programs, which are commonly referred to as the clients.

In this scenario, you should use Routing and Remote access of the Windows server 2016 service to make the computer system act as a Dynamic Host Configuration Protocol (DHCP) relay agent.

Read more on Windows server 2016 here: https://brainly.com/question/14584088

#SPJ11

What command will prevent all unencrypted passwords from displaying in plain text in a configuration file?.

Answers

Answer:

The service password-encryption command

Explanation:

To prevent all configured passwords from appearing in plain text in configuration files, an administrator can execute the service password-encryption command. This command encrypts all configured passwords in the configuration file

Sftp uses which mechanism to provide security for authentication and data transfer?

Answers

Sftp uses SSH mechanism to provide security for authentication and data transfer.

What are SSH known for?

SSH or Secure Shell is known to be a kind of a network communication protocol that helps two computers to be able to communicate and also  share their data.

Therefore, one can say that Sftp uses SSH mechanism to provide security for authentication and data transfer.

Learn more about  SSH mechanism from

https://brainly.com/question/13086077

#SPJ12

Write an algorithm to calculate the cube of a number

Answers

Explanation:

step 1 - Start

step 2 - Input l

step 3 - Cube =l×l×l

step 4 - Print the cube

step 5 - End

Write an if-else statement to describe an integer. Print positive even number if iseven and ispositive are both true. Print positive number if iseven is false and ispositive is true. Print not a positive number otherwise. End with newline.

Answers

The positive number if is even is false and the positive is true. Print, not a positive number otherwise. End with a newline. C code is the answer.

How, support your answer?

#include <stdio.h>

#include <stdbool.h>

int main(void) {

int userNum;

bool is Positive;

bool is Even;

scanf("%d", &userNum);

isPositive = (userNum > 0);

isEven = ((userNum % 2) == 0);

if(isPositive && isEven){  printf("Positive even number");}

else if(isPositive && !isEven){

 printf("Positive number");}

else{ printf("Not a positive number");

}printf("\n");

return 0;

Thus, this could be the answer.

To learn more about integer. click here:

https://brainly.com/question/2114800

#SPJ1

To freeze rows 1 and 2, and columns 1, 2, and 3, which cell should you highlight before selecting freeze panes?.

Answers

In the case above, the cell that you can highlight before selecting freeze panes is row 3 column 4.

How do one freeze several column?

This can be done when a person select the column that's is said to be next to the right of the last column a person want to freeze.

Therefore, In the case above, the cell that you can highlight before selecting freeze panes is row 3 column 4.

Learn more about panes from

https://brainly.com/question/17194167

#SPJ1

how often does windows automatically defragment a hard drive or trim a solid-state drive?

Answers

The duration that windows automatically defragment a hard drive or trim a solid-state drive is once a week.

What is windows?

It should be noted that Windows is a separate viewing area on a computer display screen in a system.

In this case, the duration that windows automatically defragment a hard drive or trim a solid-state drive is once a week.

Learn more about windows on:

brainly.com/question/25243683

#SPJ12

explain different types of secondary memory of computer system

Answers

Answer:

There are three main types of secondary storage in a computer system: solid state storage devices, such as USB memory sticks. optical storage devices, such as CD, DVD and Blu-ray discs. magnetic storage devices, such as hard disk drives.

Explanation:

How do you set form control properties?
A. Right-click the form in the Navigation pane, and then select Edit Controls.
B. Open in Design or Layout view, click the Design tab and then select Tools group.
C. Open in Form view, click the Design tab and then select Tools group.
D. Open in Design or Layout view, click the Arrange tab, and then select Tools group.

Answers

Answer:

Answer : B. open design tab

what methods could you use to set up printing in an organization?

Answers

The methods could you use to set up printing in an organization?

One can connect directly to a printer.One can set up a print server.One can use cloud service to set up printers.

What is the aim of printing?

Printing is the act of reproducing text and images  in a lot of quantities through the use of a master form or template.

Therefore, The methods could you use to set up printing in an organization?

One can connect directly to a printer.One can set up a print server.One can use cloud service to set up printers.

Learn more about printing from

https://brainly.com/question/145385

#SP11

if we intend to include a servo motor as an actuator, what feature should we include when selecting a microcontroller?

Answers

If we intend to include a servo motor as an actuator, the feature that we should include when selecting a microcontroller is pulse width modulation pin.

What is a microcontroller?

It should be noted that a microcontroller simply means an integrated circuit that designed to govern particular operation in a system.

In this case, if we intend to include a servo motor as an actuator, the feature that we should include when selecting a microcontroller is pulse width modulation pin.

Learn more about microcontroller on:

brainly.com/question/15745800

#SPJ12

You'd like to change the minimum password length policy in the default domain policy group policy preference (gpo). What's the best way to go about doing this?

Answers

The best way to change the minimum password length policy is to open the Group Policy Management Console by running gpmc.msc from CLI.

What is a password policy?

A password policy refers to a set of rules and standard that are designed and developed by the data security of an organization, so as to enhance computer security and ensure all password meet the minimum requirements such as:

Password lengthPassword maximum age.Password combination

In this scenario, the best way to change the minimum password length policy is to open the Group Policy Management Console by running gpmc.msc from CLI.

Read more on password here: https://brainly.com/question/3404286

#SPJ12

30 POINTS FOR THE ANSWER FAST
For this discussion, you are going to walk through the process of completing an estimate to come up with a budget and timeline for a logo, letterhead, envelope, and invoice. Your client is a pet sitter who operates out of her home. She walks, boards, and grooms dogs. What would you charge your client? How long do you think it will take you? What programs will you use? Where will you print it?

Answers

Answer:

Sorry I don't know the answer.

what does the acronym siem stand for in a cybersecurity context?

Answers

Siem is an acronym which stands for Security Information Event Management.

From a cybersecurity context, Siem is a term used for generalized tools that help an organization monitor their IT systems in other to detect potential cyberattacks.

In other words, Siem helps companies monitor and detail security events that occur within an organization's IT infrastructure.

You can learn more about Siem here https://brainly.com/question/25720881

#SPJ9

a diminished triad can be indicated by

Answers

A  diminished triad can be indicated by A lower-case Roman numeral and °.

How do you Know a diminished triad?

In any diminished triad, the middle and top two notes of the chord are known to be the flattened and shown by the symbol "o" or "dim."

Therefore, A  diminished triad can be indicated by A lower-case Roman numeral and °.

See options from below

A diminished triad can be indicated by:

A) A lower-case Roman numeral and °.

B) A lower-case Roman numeral and +.

C) An upper-case Roman number and °.

Learn more about triad from

https://brainly.com/question/4951751

#SPJ11

the internet is controlled by ______

Answers

In the case above, No one control the Internet.

What is the internet control about?

Note that no one and everyone has no control over the use of the Internet as it is said to be a network of networks.

Note that there are separate networks that is said to belongs to different firms and organizations as they have their own laws and regulations.

Therefore, In the case above, No one control the Internet.

Learn more about Internet from

https://brainly.com/question/2780939

#SPJ11

Select all the correct answers.
which two statements about network segmentation are true?

can be done at no additional cost

managing segments can be tedious

can add security at each level

ideal for smaller networks

faults are easier to detect

Answers

Answer:

can add security at each levelfaults are easier to detect

The two statements that are true about the market segmentation is that it  can add security at each level and faults are easier to detect. Options C and E are correct.

What is the network segmentation?

Network segmentation is a network security technique that divides a network into smaller, distinct subnetworks that enable network teams to compartmentalize the subnetworks and deliver unique security controls and services to each subnetwork.

Typically, segmentation is done through a combination of firewalls, Virtual Local Area Networks (VLANs), and Software Defined Networking (SDN). VLAN segmentation: Networks are typically segmented with VLANs or subnets. VLANs create smaller network segments that connect hosts virtually.

To implement network segmentation, network teams should start by creating security policies for each type of data and asset they need to protect. The policies should identify each resource, the users and systems that access it, and the type of access that should be provided.

Therefore, option C and E are correct.

Learn more about market segmentation, refer to:

https://brainly.com/question/27993208

#SPJ2

an estimated _____ percent of all college students suffer from ptsd.

Answers

An estimated amount of nine (9) percent of all college students suffers from PTSD.

What is the meaning of Post Traumatic Stress Disorder (PTSD)?

Post-traumatic stress disorder (PTSD) is a mental health disorder caused by experiencing a traumatic incident.

It can emerge after experiencing or witnessing a traumatic incident from symptoms includes from such as:

Flashbacks from accidents or war,Nightmares,Acute anxiety, as well as Uncontrolled thoughts from abuse.

According to statistics, it is estimated that nine (9) percent of all college students suffer from PTSD.

Learn more about Post Traumatic Stress Disorder here:

https://brainly.com/question/13097232

#SPJ12

You manage a Windows system. You would like to generate a report that runs several basic tests of the operating system, Security Center, hard disk, services, and hardware devices and drivers. How can you generate a report that includes suggestions for how to improve system performance

Answers

Answer:

In Performance Monitor, run the System Diagnostics data collector set.

Which network lets its users send and receive data as if their devices were connected to the private network even if they are not?

Answers

Answer:

Virtual Private Network, also known as VPN

Explanation:

A VPN connects a private network to a public network like the Internet. It lets users to send and receive data over public network systems as if their electronic systems were directly linked to the private network, benefits from the private network's capabilities, encryption, and administrative rules. A VPN is built by using dedicated connections, virtual tunneling technologies, or data encryption to construct a virtual point-to-point connectivity.

VPNs securely link a company's geographically disparate locations, forming one unified network. Individual Internet users also utilize VPN technology to safeguard their wireless activities, evade geo-restrictions and censorship, and link to proxy servers to secure their personal identity and location. VPN is a security mechanism that is best suited for individual user connections rather than secure connections of a variety of embedded devices.

Assume the int variables i, lo, hi, and result have been declared and that lo and hi have been initialized. Write a for loop that adds the integers between lo and hi (inclusive), and stores the result in result. Your code should not change the values of lo and hi. Also, do not declare any additional variables -- use only i, lo, hi, and result. 1 Enter your code

Answers

The loop will be:

int lo, hi, result;

result = 0;

//the loop will be as follows:

for(i = lo; i <= hi; i++)

{

result = i++;

}

What is a loop?

A loop is a sequence of instruction s that is continually repeated until a certain condition is reached.

The above loop means that the integer (i) will start from the value of lo, and stop when the value of i is equal to hi

Learn more about loop on:

https://brainly.com/question/26568485

#SPJ12

Other Questions
What are the roots of x In-10x2 + 12x-9=0? OA. 616 -1 10 316 10 OB. O C. 3124 10131/24 OD. ti24 OE. 1, 2:6 51 10 What are the roots of x In - 10x2 + 12x - 9 = 0 ? OA . 616 -1 10 316 10 OB . O C. 3124 10131/24 OD . ti24 OE . 1 , 2 : 6 51 10 2. Which of the following is true for the relation f(x) = x + 8 only the equation is the function Only the in inverse is a function Neither the equation nor its inverse is a function Both the equation and its inverse are function when did Mahatma Gandhi start on non-cooperation movement and Quit India Movement ? state years. Which expression is equivalent to... If a is a negative number, then aalways, alwaysand b is a negative number, then product ab is ? What prompted Beneathas dream to become a doctor?Select one:a. prove she is just as good as George Murchison.b. making good money to support the family.c. her need for a surgery she cannot afford.d. her memory of Rufus accident and recovery from the hospital.e. the death of her father due to poor health care. The Monroe Doctrine pledged Not to interfere with what in the western hemisphere I will give brainliest Horizontal lines n and m are intersected by lines q and p. At the intersection of lines q and n, the uppercase right angle is angle 4. At the intersection of lines q and m, the uppercase left angle is angle 1. At the intersection of lines p and n, the bottom left angle is angle 3. At the intersection of lines p and m, the uppercase left angle is angle 2.If angle 1 is 110, what would the other angle measures have to be in order for m || n andq || p?Angle 2 = Angle 3 = Angle 4 = PLEASE HELP ME!! sos how did the scientific revolution affect societies between the 17th and 19th centuries Group of 5 people can do a piece of work in 6hrs- Calculate the time a group of 8 people working half the rate of first group could take Claustrophobia and acrophobia are classified under which of the following types of anxiety-related disorders?A.Social anxiety disordersB.Specific phobiaC.Obsessive-compulsive disordersD.Agoraphobia dialogue about two friends between impotence of English What term is used for species that are at serious risk of extinction? PLEASE ANSWER THESE FASTAND CORRECT PLEASE Read the excerpt from "A Genetics of Justice by Julia Alvarez.By the time my mother married my father, however, she knew all about the true nature of the dictatorship. Thousands had lost their lives in failed attempts to return the country to democracy. Family friends, whom she had assumed had dropped away of their own accord, turned out to have been disappeared. My father had been lucky. As a young man, he had narrowly escaped to Canada after the plot he had participated in as a student failed. This was to be the first of two escapes. That same year, 1937, El Generalsimo ordered the overnight slaughter of some eighteen thousand Haitians, who had come across the border to work on sugarcane plantations for slave wages.What is the central idea of this excerpt?The dictatorship resulted in many deaths.It was possible for people to escape to Canada.Many people fought for a democratic nation.The authors family was unusually lucky Please help, need it for homework Solve the following system of equations. -7x+5y=-11; -4x+3y= -7 An reaction is the effect of an electrical shock that results when two metals come into contact what is the percent composition of each element within the compound