SlideShare a Scribd company logo
1 of 6
Download to read offline
Recent Presidential debates have brought about a series of polls analyzing public opinion.
Program3 will present a software design (your choice) of the results of a public opinion poll.
Program Specifications and requirements:
Your program must use the array templated class library for storing the following:
· presidential candidate names in a one-dimensional array of strings
· four areas of national concern such as “security”, “education”, etc. in a one-dimensional array
of strings
· two-dimensional array of integers for storing a count of the total votes of 10000 people for who
did better in the debate
For instance, the following could represent the votes for each candidate for 4 areas of national
concern:
5460 4540
3999 6001
2000 8000
7000 3000
Assume the first row represents the first area of concern, such as “security”, the second row
could represent “education”, etc.
The first column could represent the first presidential candidate, John Brown, and the second
column could be for Jim Smith. The particular national concerns and the names of the candidates
as well as the votes will come from the keyboard. Do not hardcode any of the data for the arrays.
The arrays will be empty to begin with. The data must come from the keyboard. Be sure your
keyboard prompts are meaningful and clear to any user. You MUST NOT use any global
variables.
The output of your program will be the following:
Display the name of the national concern, the candidate and the percentage of 10000 each
candidate received in a nicely formatted table. You will need to use the io manipulators.
Display the name of the candidate that won the debate (highest total of all votes).
You must use at least three meaningful functions in addition to main.
Recent Presidential debates have brought about a series of polls analyzing public opinion.
Program3 will present a software design (your choice) of the results of a public opinion poll.
Program Specifications and requirements:
Your program must use the array templated class library for storing the following:
· presidential candidate names in a one-dimensional array of strings
· four areas of national concern such as “security”, “education”, etc. in a one-dimensional array
of strings
· two-dimensional array of integers for storing a count of the total votes of 10000 people for who
did better in the debate
For instance, the following could represent the votes for each candidate for 4 areas of national
concern:
5460 4540
3999 6001
2000 8000
7000 3000
Assume the first row represents the first area of concern, such as “security”, the second row
could represent “education”, etc.
The first column could represent the first presidential candidate, John Brown, and the second
column could be for Jim Smith. The particular national concerns and the names of the candidates
as well as the votes will come from the keyboard. Do not hardcode any of the data for the arrays.
The arrays will be empty to begin with. The data must come from the keyboard. Be sure your
keyboard prompts are meaningful and clear to any user. You MUST NOT use any global
variables.
The output of your program will be the following:
Display the name of the national concern, the candidate and the percentage of 10000 each
candidate received in a nicely formatted table. You will need to use the io manipulators.
Display the name of the candidate that won the debate (highest total of all votes).
You must use at least three meaningful functions in addition to main.
Recent Presidential debates have brought about a series of polls analyzing public opinion.
Program3 will present a software design (your choice) of the results of a public opinion poll.
Program Specifications and requirements:
Your program must use the array templated class library for storing the following:
· presidential candidate names in a one-dimensional array of strings
· four areas of national concern such as “security”, “education”, etc. in a one-dimensional array
of strings
· two-dimensional array of integers for storing a count of the total votes of 10000 people for who
did better in the debate
For instance, the following could represent the votes for each candidate for 4 areas of national
concern:
5460 4540
3999 6001
2000 8000
7000 3000
Assume the first row represents the first area of concern, such as “security”, the second row
could represent “education”, etc.
The first column could represent the first presidential candidate, John Brown, and the second
column could be for Jim Smith. The particular national concerns and the names of the candidates
as well as the votes will come from the keyboard. Do not hardcode any of the data for the arrays.
The arrays will be empty to begin with. The data must come from the keyboard. Be sure your
keyboard prompts are meaningful and clear to any user. You MUST NOT use any global
variables.
The output of your program will be the following:
Display the name of the national concern, the candidate and the percentage of 10000 each
candidate received in a nicely formatted table. You will need to use the io manipulators.
Display the name of the candidate that won the debate (highest total of all votes).
You must use at least three meaningful functions in addition to main.
Solution
#include
template
class debate
{
T *namea=new char[];
T *nationalc=new int[];
T *percentage=new int[];
T *per=new int[];
T n,i;
public:
Void input()
{
cout<<"enter total elements";
cin>>i;
for(n=0;n>namea[n];
}
for(n=0;n>nationalc[n];
}
for(n=0;n>nationalc[n];
sum+ =nationalc[n];
}
percentage[0]=(sum/n)*100;
cout<>nationalc[i];
}
for(n=0;n d;
cout" ";
cout<<" Name security education political Judicial";
cout" " ;
d.input();
d.percentagec();
d.result();
}

More Related Content

Similar to Recent Presidential debates have brought about a series of polls.pdf

Program 4~$AD FOR WHAT TO DO.docxProgram 4READ FOR WHAT TO.docx
Program 4~$AD FOR WHAT TO DO.docxProgram 4READ FOR WHAT TO.docxProgram 4~$AD FOR WHAT TO DO.docxProgram 4READ FOR WHAT TO.docx
Program 4~$AD FOR WHAT TO DO.docxProgram 4READ FOR WHAT TO.docx
wkyra78
 
Week 6 - Discussion ForumRequired ResourcesTextSharpe, N. .docx
Week 6 - Discussion ForumRequired ResourcesTextSharpe, N. .docxWeek 6 - Discussion ForumRequired ResourcesTextSharpe, N. .docx
Week 6 - Discussion ForumRequired ResourcesTextSharpe, N. .docx
helzerpatrina
 
Assignment Week 1.docDue by 11pm June 30th Chapter 1.docx
Assignment Week 1.docDue by 11pm June 30th Chapter 1.docxAssignment Week 1.docDue by 11pm June 30th Chapter 1.docx
Assignment Week 1.docDue by 11pm June 30th Chapter 1.docx
ssuser562afc1
 
Complete both Part A and Part B below.Part A.docx
Complete both Part A and Part B below.Part A.docxComplete both Part A and Part B below.Part A.docx
Complete both Part A and Part B below.Part A.docx
ladonnacamplin
 
Mexican American Government 2311 Midterm Exam DirectionsRead.docx
Mexican American Government 2311 Midterm Exam  DirectionsRead.docxMexican American Government 2311 Midterm Exam  DirectionsRead.docx
Mexican American Government 2311 Midterm Exam DirectionsRead.docx
ARIV4
 
Machine Learning ICS 273A
Machine Learning ICS 273AMachine Learning ICS 273A
Machine Learning ICS 273A
butest
 
Machine Learning ICS 273A
Machine Learning ICS 273AMachine Learning ICS 273A
Machine Learning ICS 273A
butest
 
ISOL 536Security Architecture and DesignLab Threat Mod.docx
ISOL 536Security Architecture and DesignLab  Threat Mod.docxISOL 536Security Architecture and DesignLab  Threat Mod.docx
ISOL 536Security Architecture and DesignLab Threat Mod.docx
vrickens
 

Similar to Recent Presidential debates have brought about a series of polls.pdf (20)

Program 4~$AD FOR WHAT TO DO.docxProgram 4READ FOR WHAT TO.docx
Program 4~$AD FOR WHAT TO DO.docxProgram 4READ FOR WHAT TO.docxProgram 4~$AD FOR WHAT TO DO.docxProgram 4READ FOR WHAT TO.docx
Program 4~$AD FOR WHAT TO DO.docxProgram 4READ FOR WHAT TO.docx
 
Java one2016 con3054-watsonap-is
Java one2016 con3054-watsonap-isJava one2016 con3054-watsonap-is
Java one2016 con3054-watsonap-is
 
Building Cognitive Applications with Watson APIs
Building Cognitive Applications with Watson APIs Building Cognitive Applications with Watson APIs
Building Cognitive Applications with Watson APIs
 
Java one2016 con3054-watsonap-is
Java one2016 con3054-watsonap-isJava one2016 con3054-watsonap-is
Java one2016 con3054-watsonap-is
 
Lesson 4 collecting data
Lesson 4   collecting dataLesson 4   collecting data
Lesson 4 collecting data
 
A c program of Phonebook application
A c program of Phonebook applicationA c program of Phonebook application
A c program of Phonebook application
 
Analytics anecdotes
Analytics anecdotesAnalytics anecdotes
Analytics anecdotes
 
Week 6 - Discussion ForumRequired ResourcesTextSharpe, N. .docx
Week 6 - Discussion ForumRequired ResourcesTextSharpe, N. .docxWeek 6 - Discussion ForumRequired ResourcesTextSharpe, N. .docx
Week 6 - Discussion ForumRequired ResourcesTextSharpe, N. .docx
 
Twitter sentimentanalysis report
Twitter sentimentanalysis reportTwitter sentimentanalysis report
Twitter sentimentanalysis report
 
If switch structure
If switch structureIf switch structure
If switch structure
 
Strategic perspectives 3
Strategic perspectives 3Strategic perspectives 3
Strategic perspectives 3
 
Ca2 dv report
Ca2 dv reportCa2 dv report
Ca2 dv report
 
Assignment Week 1.docDue by 11pm June 30th Chapter 1.docx
Assignment Week 1.docDue by 11pm June 30th Chapter 1.docxAssignment Week 1.docDue by 11pm June 30th Chapter 1.docx
Assignment Week 1.docDue by 11pm June 30th Chapter 1.docx
 
Complete both Part A and Part B below.Part A.docx
Complete both Part A and Part B below.Part A.docxComplete both Part A and Part B below.Part A.docx
Complete both Part A and Part B below.Part A.docx
 
Mexican American Government 2311 Midterm Exam DirectionsRead.docx
Mexican American Government 2311 Midterm Exam  DirectionsRead.docxMexican American Government 2311 Midterm Exam  DirectionsRead.docx
Mexican American Government 2311 Midterm Exam DirectionsRead.docx
 
From DBA to DE: Becoming a Data Engineer
From DBA to DE:  Becoming a Data Engineer From DBA to DE:  Becoming a Data Engineer
From DBA to DE: Becoming a Data Engineer
 
Machine Learning ICS 273A
Machine Learning ICS 273AMachine Learning ICS 273A
Machine Learning ICS 273A
 
Machine Learning ICS 273A
Machine Learning ICS 273AMachine Learning ICS 273A
Machine Learning ICS 273A
 
Using Meltwater to Identify Competitor Data Assignment
Using Meltwater to Identify Competitor Data AssignmentUsing Meltwater to Identify Competitor Data Assignment
Using Meltwater to Identify Competitor Data Assignment
 
ISOL 536Security Architecture and DesignLab Threat Mod.docx
ISOL 536Security Architecture and DesignLab  Threat Mod.docxISOL 536Security Architecture and DesignLab  Threat Mod.docx
ISOL 536Security Architecture and DesignLab Threat Mod.docx
 

More from jibinsh

What type of cell-surface characteristic helps an epithelial tissue h.pdf
What type of cell-surface characteristic helps an epithelial tissue h.pdfWhat type of cell-surface characteristic helps an epithelial tissue h.pdf
What type of cell-surface characteristic helps an epithelial tissue h.pdf
jibinsh
 
What is NOT a requirement for evolution by natural selection to.pdf
What is NOT a requirement for evolution by natural selection to.pdfWhat is NOT a requirement for evolution by natural selection to.pdf
What is NOT a requirement for evolution by natural selection to.pdf
jibinsh
 
What is James Wilsons leadership style and traits What made him dif.pdf
What is James Wilsons leadership style and traits What made him dif.pdfWhat is James Wilsons leadership style and traits What made him dif.pdf
What is James Wilsons leadership style and traits What made him dif.pdf
jibinsh
 
This project calls for the modification of the DollarFormat clas.pdf
This project calls for the modification of the DollarFormat clas.pdfThis project calls for the modification of the DollarFormat clas.pdf
This project calls for the modification of the DollarFormat clas.pdf
jibinsh
 
The energy used in the CaMn cycle for the production of carbohydrate .pdf
The energy used in the CaMn cycle for the production of carbohydrate .pdfThe energy used in the CaMn cycle for the production of carbohydrate .pdf
The energy used in the CaMn cycle for the production of carbohydrate .pdf
jibinsh
 
The CAN-SPAM Acta.   applies to virtually all promotional e-mails,.pdf
The CAN-SPAM Acta.   applies to virtually all promotional e-mails,.pdfThe CAN-SPAM Acta.   applies to virtually all promotional e-mails,.pdf
The CAN-SPAM Acta.   applies to virtually all promotional e-mails,.pdf
jibinsh
 
Please give me a custom example code of a complex PovRay Program tha.pdf
Please give me a custom example code of a complex PovRay Program tha.pdfPlease give me a custom example code of a complex PovRay Program tha.pdf
Please give me a custom example code of a complex PovRay Program tha.pdf
jibinsh
 
A)abductionB)deductive reasoningc) inductive reasoningd)a wild.pdf
A)abductionB)deductive reasoningc) inductive reasoningd)a wild.pdfA)abductionB)deductive reasoningc) inductive reasoningd)a wild.pdf
A)abductionB)deductive reasoningc) inductive reasoningd)a wild.pdf
jibinsh
 
JAVAWrite a program that takes a command-line argument representin.pdf
JAVAWrite a program that takes a command-line argument representin.pdfJAVAWrite a program that takes a command-line argument representin.pdf
JAVAWrite a program that takes a command-line argument representin.pdf
jibinsh
 

More from jibinsh (20)

What part of the brain is used in sympathetic arousal (ANS)Solu.pdf
What part of the brain is used in sympathetic arousal (ANS)Solu.pdfWhat part of the brain is used in sympathetic arousal (ANS)Solu.pdf
What part of the brain is used in sympathetic arousal (ANS)Solu.pdf
 
What type of cell-surface characteristic helps an epithelial tissue h.pdf
What type of cell-surface characteristic helps an epithelial tissue h.pdfWhat type of cell-surface characteristic helps an epithelial tissue h.pdf
What type of cell-surface characteristic helps an epithelial tissue h.pdf
 
Which bond would be most polar whySolutionstarting with .pdf
Which bond would be most polar whySolutionstarting with .pdfWhich bond would be most polar whySolutionstarting with .pdf
Which bond would be most polar whySolutionstarting with .pdf
 
What is NOT a requirement for evolution by natural selection to.pdf
What is NOT a requirement for evolution by natural selection to.pdfWhat is NOT a requirement for evolution by natural selection to.pdf
What is NOT a requirement for evolution by natural selection to.pdf
 
What is James Wilsons leadership style and traits What made him dif.pdf
What is James Wilsons leadership style and traits What made him dif.pdfWhat is James Wilsons leadership style and traits What made him dif.pdf
What is James Wilsons leadership style and traits What made him dif.pdf
 
This project calls for the modification of the DollarFormat clas.pdf
This project calls for the modification of the DollarFormat clas.pdfThis project calls for the modification of the DollarFormat clas.pdf
This project calls for the modification of the DollarFormat clas.pdf
 
The method FRET ALEX is a more precise way to determine the number o.pdf
The method FRET ALEX is a more precise way to determine the number o.pdfThe method FRET ALEX is a more precise way to determine the number o.pdf
The method FRET ALEX is a more precise way to determine the number o.pdf
 
The initial velocity is How do you solve the initial velocity.pdf
The initial velocity is How do you solve the initial velocity.pdfThe initial velocity is How do you solve the initial velocity.pdf
The initial velocity is How do you solve the initial velocity.pdf
 
The following expression was simplified incorrectly. In which line er.pdf
The following expression was simplified incorrectly. In which line er.pdfThe following expression was simplified incorrectly. In which line er.pdf
The following expression was simplified incorrectly. In which line er.pdf
 
The energy used in the CaMn cycle for the production of carbohydrate .pdf
The energy used in the CaMn cycle for the production of carbohydrate .pdfThe energy used in the CaMn cycle for the production of carbohydrate .pdf
The energy used in the CaMn cycle for the production of carbohydrate .pdf
 
The CAN-SPAM Acta.   applies to virtually all promotional e-mails,.pdf
The CAN-SPAM Acta.   applies to virtually all promotional e-mails,.pdfThe CAN-SPAM Acta.   applies to virtually all promotional e-mails,.pdf
The CAN-SPAM Acta.   applies to virtually all promotional e-mails,.pdf
 
SensesFor each of the special senses, understand how a stimulus is.pdf
SensesFor each of the special senses, understand how a stimulus is.pdfSensesFor each of the special senses, understand how a stimulus is.pdf
SensesFor each of the special senses, understand how a stimulus is.pdf
 
Quality function deployment (QFD) is a structures approach for integ.pdf
Quality function deployment (QFD) is a structures approach for integ.pdfQuality function deployment (QFD) is a structures approach for integ.pdf
Quality function deployment (QFD) is a structures approach for integ.pdf
 
please send edited code. I have posted this a few times with lots of.pdf
please send edited code. I have posted this a few times with lots of.pdfplease send edited code. I have posted this a few times with lots of.pdf
please send edited code. I have posted this a few times with lots of.pdf
 
Please give me a custom example code of a complex PovRay Program tha.pdf
Please give me a custom example code of a complex PovRay Program tha.pdfPlease give me a custom example code of a complex PovRay Program tha.pdf
Please give me a custom example code of a complex PovRay Program tha.pdf
 
Networking Question What are the key differences between forwarding.pdf
Networking Question What are the key differences between forwarding.pdfNetworking Question What are the key differences between forwarding.pdf
Networking Question What are the key differences between forwarding.pdf
 
Most children with cystic fibrosis have frequent lung infections and.pdf
Most children with cystic fibrosis have frequent lung infections and.pdfMost children with cystic fibrosis have frequent lung infections and.pdf
Most children with cystic fibrosis have frequent lung infections and.pdf
 
A)abductionB)deductive reasoningc) inductive reasoningd)a wild.pdf
A)abductionB)deductive reasoningc) inductive reasoningd)a wild.pdfA)abductionB)deductive reasoningc) inductive reasoningd)a wild.pdf
A)abductionB)deductive reasoningc) inductive reasoningd)a wild.pdf
 
Lipid rafts are associated with which of the following activities re.pdf
Lipid rafts are associated with which of the following activities re.pdfLipid rafts are associated with which of the following activities re.pdf
Lipid rafts are associated with which of the following activities re.pdf
 
JAVAWrite a program that takes a command-line argument representin.pdf
JAVAWrite a program that takes a command-line argument representin.pdfJAVAWrite a program that takes a command-line argument representin.pdf
JAVAWrite a program that takes a command-line argument representin.pdf
 

Recently uploaded

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 

Recently uploaded (20)

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 

Recent Presidential debates have brought about a series of polls.pdf

  • 1. Recent Presidential debates have brought about a series of polls analyzing public opinion. Program3 will present a software design (your choice) of the results of a public opinion poll. Program Specifications and requirements: Your program must use the array templated class library for storing the following: · presidential candidate names in a one-dimensional array of strings · four areas of national concern such as “security”, “education”, etc. in a one-dimensional array of strings · two-dimensional array of integers for storing a count of the total votes of 10000 people for who did better in the debate For instance, the following could represent the votes for each candidate for 4 areas of national concern: 5460 4540 3999 6001 2000 8000 7000 3000
  • 2. Assume the first row represents the first area of concern, such as “security”, the second row could represent “education”, etc. The first column could represent the first presidential candidate, John Brown, and the second column could be for Jim Smith. The particular national concerns and the names of the candidates as well as the votes will come from the keyboard. Do not hardcode any of the data for the arrays. The arrays will be empty to begin with. The data must come from the keyboard. Be sure your keyboard prompts are meaningful and clear to any user. You MUST NOT use any global variables. The output of your program will be the following: Display the name of the national concern, the candidate and the percentage of 10000 each candidate received in a nicely formatted table. You will need to use the io manipulators. Display the name of the candidate that won the debate (highest total of all votes). You must use at least three meaningful functions in addition to main. Recent Presidential debates have brought about a series of polls analyzing public opinion. Program3 will present a software design (your choice) of the results of a public opinion poll. Program Specifications and requirements: Your program must use the array templated class library for storing the following:
  • 3. · presidential candidate names in a one-dimensional array of strings · four areas of national concern such as “security”, “education”, etc. in a one-dimensional array of strings · two-dimensional array of integers for storing a count of the total votes of 10000 people for who did better in the debate For instance, the following could represent the votes for each candidate for 4 areas of national concern: 5460 4540 3999 6001 2000 8000 7000 3000 Assume the first row represents the first area of concern, such as “security”, the second row could represent “education”, etc. The first column could represent the first presidential candidate, John Brown, and the second column could be for Jim Smith. The particular national concerns and the names of the candidates as well as the votes will come from the keyboard. Do not hardcode any of the data for the arrays. The arrays will be empty to begin with. The data must come from the keyboard. Be sure your keyboard prompts are meaningful and clear to any user. You MUST NOT use any global variables. The output of your program will be the following:
  • 4. Display the name of the national concern, the candidate and the percentage of 10000 each candidate received in a nicely formatted table. You will need to use the io manipulators. Display the name of the candidate that won the debate (highest total of all votes). You must use at least three meaningful functions in addition to main. Recent Presidential debates have brought about a series of polls analyzing public opinion. Program3 will present a software design (your choice) of the results of a public opinion poll. Program Specifications and requirements: Your program must use the array templated class library for storing the following: · presidential candidate names in a one-dimensional array of strings · four areas of national concern such as “security”, “education”, etc. in a one-dimensional array of strings · two-dimensional array of integers for storing a count of the total votes of 10000 people for who did better in the debate For instance, the following could represent the votes for each candidate for 4 areas of national concern:
  • 5. 5460 4540 3999 6001 2000 8000 7000 3000 Assume the first row represents the first area of concern, such as “security”, the second row could represent “education”, etc. The first column could represent the first presidential candidate, John Brown, and the second column could be for Jim Smith. The particular national concerns and the names of the candidates as well as the votes will come from the keyboard. Do not hardcode any of the data for the arrays. The arrays will be empty to begin with. The data must come from the keyboard. Be sure your keyboard prompts are meaningful and clear to any user. You MUST NOT use any global variables. The output of your program will be the following: Display the name of the national concern, the candidate and the percentage of 10000 each candidate received in a nicely formatted table. You will need to use the io manipulators. Display the name of the candidate that won the debate (highest total of all votes). You must use at least three meaningful functions in addition to main. Solution
  • 6. #include template class debate { T *namea=new char[]; T *nationalc=new int[]; T *percentage=new int[]; T *per=new int[]; T n,i; public: Void input() { cout<<"enter total elements"; cin>>i; for(n=0;n>namea[n]; } for(n=0;n>nationalc[n]; } for(n=0;n>nationalc[n]; sum+ =nationalc[n]; } percentage[0]=(sum/n)*100; cout<>nationalc[i]; } for(n=0;n d; cout" "; cout<<" Name security education political Judicial"; cout" " ; d.input(); d.percentagec(); d.result(); }