Immediate start for 5 C++ Questions

Slutfört Publicerat 7 år sedan Betalades vid leverans
Slutfört Betalades vid leverans

5 Short Coding Questions. Please see attachment for more details.

1. The following code does not perform as expected. What is happening? Fix the code so

that it performs the task correctly.

2. Write a program to perform an analysis of the rolling of two dice. Your program should use rand()%6 + 1 to roll the first dice and then again to roll the second dice. With each dice roll, the outcome of the rolls should be tallied in a 6 x 6 two-dimensional array that represents all possible combinations of dice rolls (as seen below). For example, if the first number rolled is a 2, and the second number a 3, then the value in the spot indicated with an ‘x’ below would be incremented by 1. Repeat this dice roll process 10,000 times. On completion, display a report that shows the total counts.

3. Write a program to load a vector with 50 random integers between the numbers 0-49. Once the vector is loaded, display a report of how many numbers are in the range 0-9, 10-19, 20-29, 30-39, and 40-49.

4. You have a class called “Customer” which has a number of data members (m_nID, m_sName, m_nPhoneNum) as well as accessor functions for these data members called getID, getName, and getPhoneNum. The constructor for the class accepts two integers and a string to set the values of these data members. Using C++ code, declare a vector to hold pointers to Customer objects and create 3 customers in the vector. Write code to display a report of the customers stored in the

vector. Finally, write code to delete the customers appropriately for when the program ends.

5. The company that utilises the Customer class as described above has now added a new tier of customer, a Gold Customer, that has the same attributes, but also has a number of other attributes. These include they number of years they have been a member, and a discount rate that the customer now gets on all purchases. Write a class that inherits from the Customer class that adds these data members as well as a function that can get the discount rate. Your constructor should set the initial values to 1 year of membership and a 10% discount rate. You should then update your collection of customers from the previous question so that it can hold and work with both normal customers and gold customers.

C++-programmering Coding

Projekt-id: #12075319

About the project

15 offerter Distansprojekt Aktivt 7 år sedan

Tilldelades:

kostasrim

Hello, my name is Kostas and I am an expert c/c++ developer with an extensive knowledge of algorithms and data structures. I can have your core ready in a day. Please send me a message to discuss the details. Mer

$35 AUD inom 1 dag
(23 omdömen)
4.1

15 frilansare har lagt bud på i genomsnitt $38 för det här jobbet

LiangXiaoJin

Dear client, how are you? I am a C++ programmer and mathematician. No problem. Lets do. Please check my "Profile & Work List" and tell me details if my skill is in your concern. Looking forward to your response. T Mer

$100 AUD inom 0 dagar
(70 omdömen)
7.3
PiasKumarDas

Hello, I will do it within the shortest possible time and with low budget..... Hope, i will be a part of the job. Thanks

$20 AUD inom 3 dagar
(33 omdömen)
4.8
vtatarenko

Hi there! I am absolutely suitable for this project and can start right now. It will be finished in 24 hrs if you choose me. Waiting for your response. Regards, Valentin

$35 AUD inom 1 dag
(10 omdömen)
3.3
rakoty

I have very good experience in c++ programming language besides my skills in data structures and algorithms as well

$30 AUD inom 1 dag
(6 omdömen)
2.5
AmmarHafeez

Hi.... I am a c/c++ programmer.. I have checked the pdf attached and I can complete task in minimum time by starting it now.. We can discuss more over chat... Looking forward to work with you...

$40 AUD inom 1 dag
(6 omdömen)
2.5
hunyadix

Hey there! I'm an expert of c++; please contact me and let us get started! :) I guarantee that my answers are going to be correct. Cheers, Adam

$20 AUD inom 1 dag
(1 omdöme)
1.2
Rabea95

hello I will make quickly and professionally , that I have a good experience in programing if you want I can do it from now :) and thank you

$30 AUD inom 0 dagar
(0 omdömen)
0.0
ImaginationDev

Dear Friend , the question are very well defined and that makes completion of the task very easy ... look forward to work with you on the look term basis as well. Regards

$35 AUD inom 2 dagar
(0 omdömen)
0.0
rasulnabiyev59

A proposal has not yet been provided

$15 AUD inom 1 dag
(0 omdömen)
0.0
asbahnasy

Dears, I'm glad to do this job for you, I'm a fresh graduate Mechatronics Engineer and I've solid background in programming, I can handle this. Looking forward to hearing from you soon. Thanks.

$20 AUD inom 1 dag
(0 omdömen)
0.0