SlideShare a Scribd company logo
1 of 3
Week 3-4 Programming Assignment
Core Learning Outcomes addressed in this assignment:
Demonstrate creativity and problem-solving skills. (9)
Write C++ programs that use proper style and documentation.
(10)
Write C++ programs that use Pointers and dynamic memory
allocation. (11)
Write C++ programs that uses Function Templates. (11)
Its is C++ program
Grading Information:
This Lab Homework is worth
76 points
and due by
Sunday of week 4
at midnight CST.
The purpose of this assignment is to assess if you can create a
program that uses pointers, templates, and dynamic memory
allocation.
Two files are required to make this program work, d_random.h
and d_vector.h.
Both files are available in the “Doc Sharing” area.
Directions
Points
The file must be called
week3-4Prog.cpp
This program will store in miniVector v a list of 15 random
integers from 0 to 99, then it will output the vector, sort the
vector, then output it again sorted. The miniVector class is on
page 250.
5
Program Definition
1. Create program definition with the following templates and
methods:
// output miniVector v
template
void writeMiniVector(const miniVector& v);
// use insertion sort to place miniVector v in descending order
template
void sortMiniVector(miniVector& v);
6
Main Method
1. Declare: miniVector v;
2. Declare: randomNumber rnd;
3. call v.push_back(rnd.random(100)); to push 15 entries from
0-99 onto the vector
4. call writeMiniVector to output vector
5. call sortMiniVector to sort the vector
6. call writeMiniVector to output the sorted vector.
After you output the sorted vector:
Include:
system("PAUSE");
after your output to pause the screen.
10
writeMiniVector Method (const miniVector& v)
1. Iterate through the vector v and output each element to the
screen.
20
sortMiniVector Method (miniVector& v)
1. Sort the elements of vector v.
2. Since it is passed-by-reference, no return is necessary.
20
Ensure you include
ALL
.cpp file(s) and any associated, student-defined .h (header) files
required to make your program compile and run. The only files
in the dropbox should be .cpp and .h files. Do not turn in .zip,
.exe, .rar, etc files.
10
Upload your page to the Dropbox.
NOTE
: Complete your activity and submit it to the Dropbox by
clicking on the
Dropbox
tab at the top of the course frame and choosing the correct
Weekly Activity.
If needed, click on the
Help
button above for more information on Course Tools/Using the
Dropbox
.
5
Total Possible Points
76
Example output of your program
Original: 59 18 60 91 49 47 83 93 55 52 15 36 83 56 91
Sorted: 93 91 91 83 83 60 59 56 55 52 49 47 36 18 15

More Related Content

Similar to Week 3-4 Programming AssignmentCore Learning Outcomes addressed in.docx

CIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.comCIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.combellflower82
 
Prg 218 entire course
Prg 218 entire coursePrg 218 entire course
Prg 218 entire coursegrades4u
 
Ace exam guide_flex4
Ace exam guide_flex4Ace exam guide_flex4
Ace exam guide_flex4Ana Neves
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocksTech Bikram
 
CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   llflowe
 
CIS 170 Imagine Your Future/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.com   CIS 170 Imagine Your Future/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.com   bellflower42
 
Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com  Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com amaranthbeg143
 
CIS 170 Inspiring Innovation/tutorialrank.com
 CIS 170 Inspiring Innovation/tutorialrank.com CIS 170 Inspiring Innovation/tutorialrank.com
CIS 170 Inspiring Innovation/tutorialrank.comjonhson110
 
CIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comCIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comBartholomew19
 
Strayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio newStrayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio newdixonbakerr
 
Module Six Assignment Guidelines and Rubric.htmlOverviewMa.docx
Module Six Assignment Guidelines and Rubric.htmlOverviewMa.docxModule Six Assignment Guidelines and Rubric.htmlOverviewMa.docx
Module Six Assignment Guidelines and Rubric.htmlOverviewMa.docxroushhsiu
 
X unit testing framework with c# and vs code
X unit testing framework with c# and vs codeX unit testing framework with c# and vs code
X unit testing framework with c# and vs codeShashank Tiwari
 
Strayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio newStrayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio newlroselyn
 
Strayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio newStrayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio newuopassignment
 

Similar to Week 3-4 Programming AssignmentCore Learning Outcomes addressed in.docx (20)

CIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.comCIS 170 Focus Dreams/newtonhelp.com
CIS 170 Focus Dreams/newtonhelp.com
 
Prg 218 entire course
Prg 218 entire coursePrg 218 entire course
Prg 218 entire course
 
Ace exam guide_flex4
Ace exam guide_flex4Ace exam guide_flex4
Ace exam guide_flex4
 
How to work with code blocks
How to work with code blocksHow to work with code blocks
How to work with code blocks
 
C in7-days
C in7-daysC in7-days
C in7-days
 
C in7-days
C in7-daysC in7-days
C in7-days
 
CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   CIS 170 Life of the Mind/newtonhelp.com   
CIS 170 Life of the Mind/newtonhelp.com   
 
CIS 170 Imagine Your Future/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.com   CIS 170 Imagine Your Future/newtonhelp.com   
CIS 170 Imagine Your Future/newtonhelp.com   
 
Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com  Cis 170 Extraordinary Success/newtonhelp.com
Cis 170 Extraordinary Success/newtonhelp.com
 
manual
manualmanual
manual
 
manual
manualmanual
manual
 
CIS 170 Inspiring Innovation/tutorialrank.com
 CIS 170 Inspiring Innovation/tutorialrank.com CIS 170 Inspiring Innovation/tutorialrank.com
CIS 170 Inspiring Innovation/tutorialrank.com
 
Csharp
CsharpCsharp
Csharp
 
C++Basics2022.pptx
C++Basics2022.pptxC++Basics2022.pptx
C++Basics2022.pptx
 
CIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.comCIS 170 Effective Communication - tutorialrank.com
CIS 170 Effective Communication - tutorialrank.com
 
Strayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio newStrayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio new
 
Module Six Assignment Guidelines and Rubric.htmlOverviewMa.docx
Module Six Assignment Guidelines and Rubric.htmlOverviewMa.docxModule Six Assignment Guidelines and Rubric.htmlOverviewMa.docx
Module Six Assignment Guidelines and Rubric.htmlOverviewMa.docx
 
X unit testing framework with c# and vs code
X unit testing framework with c# and vs codeX unit testing framework with c# and vs code
X unit testing framework with c# and vs code
 
Strayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio newStrayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio new
 
Strayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio newStrayer cis 406 week 6 assignment 1 financial portfolio new
Strayer cis 406 week 6 assignment 1 financial portfolio new
 

More from co4spmeley

Week 5 Microskills ScenarioLaura is a relatively new client w.docx
Week 5 Microskills ScenarioLaura is a relatively new client w.docxWeek 5 Microskills ScenarioLaura is a relatively new client w.docx
Week 5 Microskills ScenarioLaura is a relatively new client w.docxco4spmeley
 
Week 5 Homework QuestionsQuestions 1 and 2 were taken directly f.docx
Week 5 Homework QuestionsQuestions 1 and 2 were taken directly f.docxWeek 5 Homework QuestionsQuestions 1 and 2 were taken directly f.docx
Week 5 Homework QuestionsQuestions 1 and 2 were taken directly f.docxco4spmeley
 
Week 5 JournalAs an educator, a large portion of learning and .docx
Week 5 JournalAs an educator, a large portion of learning and .docxWeek 5 JournalAs an educator, a large portion of learning and .docx
Week 5 JournalAs an educator, a large portion of learning and .docxco4spmeley
 
Week 5 discussion #1Choose an immersive project approach or a webb.docx
Week 5 discussion #1Choose an immersive project approach or a webb.docxWeek 5 discussion #1Choose an immersive project approach or a webb.docx
Week 5 discussion #1Choose an immersive project approach or a webb.docxco4spmeley
 
Week 5 Microskills ScenarioLaura is a relatively ne.docx
Week 5 Microskills ScenarioLaura is a relatively ne.docxWeek 5 Microskills ScenarioLaura is a relatively ne.docx
Week 5 Microskills ScenarioLaura is a relatively ne.docxco4spmeley
 
WEEK 5SHINTOCosmogony - Origin of the UniverseNature of Go.docx
WEEK 5SHINTOCosmogony - Origin of the UniverseNature of Go.docxWEEK 5SHINTOCosmogony - Origin of the UniverseNature of Go.docx
WEEK 5SHINTOCosmogony - Origin of the UniverseNature of Go.docxco4spmeley
 
Week 5 mini-questionsJavier is retiring from the JKL Partnership.docx
Week 5 mini-questionsJavier is retiring from the JKL Partnership.docxWeek 5 mini-questionsJavier is retiring from the JKL Partnership.docx
Week 5 mini-questionsJavier is retiring from the JKL Partnership.docxco4spmeley
 
Week 4Atleast 200 wordsWhat were some differences between Byzant.docx
Week 4Atleast 200 wordsWhat were some differences between Byzant.docxWeek 4Atleast 200 wordsWhat were some differences between Byzant.docx
Week 4Atleast 200 wordsWhat were some differences between Byzant.docxco4spmeley
 
Week 4Cardiovascular DisordersVeins and arteries are vital eleme.docx
Week 4Cardiovascular DisordersVeins and arteries are vital eleme.docxWeek 4Cardiovascular DisordersVeins and arteries are vital eleme.docx
Week 4Cardiovascular DisordersVeins and arteries are vital eleme.docxco4spmeley
 
Week 4Team Building Please respond to the followingReflect on.docx
Week 4Team Building Please respond to the followingReflect on.docxWeek 4Team Building Please respond to the followingReflect on.docx
Week 4Team Building Please respond to the followingReflect on.docxco4spmeley
 
Week 4 Quiz1.According to a study cited by the U.S. Census.docx
Week 4 Quiz1.According to a study cited by the U.S. Census.docxWeek 4 Quiz1.According to a study cited by the U.S. Census.docx
Week 4 Quiz1.According to a study cited by the U.S. Census.docxco4spmeley
 
Week 5 Discussion - Restructuring Decisions & CommunityAlmost all .docx
Week 5 Discussion - Restructuring Decisions & CommunityAlmost all .docxWeek 5 Discussion - Restructuring Decisions & CommunityAlmost all .docx
Week 5 Discussion - Restructuring Decisions & CommunityAlmost all .docxco4spmeley
 
Week 4 Homework QuestionsQuestions 1 and 2 were taken directly f.docx
Week 4 Homework QuestionsQuestions 1 and 2 were taken directly f.docxWeek 4 Homework QuestionsQuestions 1 and 2 were taken directly f.docx
Week 4 Homework QuestionsQuestions 1 and 2 were taken directly f.docxco4spmeley
 
Week 4 Project - STAT 3001Student Name Date.docx
Week 4 Project - STAT 3001Student Name Date.docxWeek 4 Project - STAT 3001Student Name Date.docx
Week 4 Project - STAT 3001Student Name Date.docxco4spmeley
 
Week 6 - Discussion 1 Your initial discussion thread is .docx
Week 6 - Discussion 1 Your initial discussion thread is .docxWeek 6 - Discussion 1 Your initial discussion thread is .docx
Week 6 - Discussion 1 Your initial discussion thread is .docxco4spmeley
 
Week 4 Forum ModernismDUE WED 123015 9PMPart I Identif.docx
Week 4 Forum ModernismDUE WED 123015 9PMPart I Identif.docxWeek 4 Forum ModernismDUE WED 123015 9PMPart I Identif.docx
Week 4 Forum ModernismDUE WED 123015 9PMPart I Identif.docxco4spmeley
 
Week 4 assignment is due 1916Writea summary of no more than .docx
Week 4 assignment is due 1916Writea summary of no more than .docxWeek 4 assignment is due 1916Writea summary of no more than .docx
Week 4 assignment is due 1916Writea summary of no more than .docxco4spmeley
 
Week 4 - AssignmentCreating a Unit Plan Once you’ve gotten.docx
Week 4 - AssignmentCreating a Unit Plan Once you’ve gotten.docxWeek 4 - AssignmentCreating a Unit Plan Once you’ve gotten.docx
Week 4 - AssignmentCreating a Unit Plan Once you’ve gotten.docxco4spmeley
 
Week 3 Whats My Style PresentationWeek 3 Whats My Style Pr.docx
Week 3 Whats My Style PresentationWeek 3 Whats My Style Pr.docxWeek 3 Whats My Style PresentationWeek 3 Whats My Style Pr.docx
Week 3 Whats My Style PresentationWeek 3 Whats My Style Pr.docxco4spmeley
 
Week 3 readings and videosWrite a 350- to 700-word paper in whic.docx
Week 3 readings and videosWrite a 350- to 700-word paper in whic.docxWeek 3 readings and videosWrite a 350- to 700-word paper in whic.docx
Week 3 readings and videosWrite a 350- to 700-word paper in whic.docxco4spmeley
 

More from co4spmeley (20)

Week 5 Microskills ScenarioLaura is a relatively new client w.docx
Week 5 Microskills ScenarioLaura is a relatively new client w.docxWeek 5 Microskills ScenarioLaura is a relatively new client w.docx
Week 5 Microskills ScenarioLaura is a relatively new client w.docx
 
Week 5 Homework QuestionsQuestions 1 and 2 were taken directly f.docx
Week 5 Homework QuestionsQuestions 1 and 2 were taken directly f.docxWeek 5 Homework QuestionsQuestions 1 and 2 were taken directly f.docx
Week 5 Homework QuestionsQuestions 1 and 2 were taken directly f.docx
 
Week 5 JournalAs an educator, a large portion of learning and .docx
Week 5 JournalAs an educator, a large portion of learning and .docxWeek 5 JournalAs an educator, a large portion of learning and .docx
Week 5 JournalAs an educator, a large portion of learning and .docx
 
Week 5 discussion #1Choose an immersive project approach or a webb.docx
Week 5 discussion #1Choose an immersive project approach or a webb.docxWeek 5 discussion #1Choose an immersive project approach or a webb.docx
Week 5 discussion #1Choose an immersive project approach or a webb.docx
 
Week 5 Microskills ScenarioLaura is a relatively ne.docx
Week 5 Microskills ScenarioLaura is a relatively ne.docxWeek 5 Microskills ScenarioLaura is a relatively ne.docx
Week 5 Microskills ScenarioLaura is a relatively ne.docx
 
WEEK 5SHINTOCosmogony - Origin of the UniverseNature of Go.docx
WEEK 5SHINTOCosmogony - Origin of the UniverseNature of Go.docxWEEK 5SHINTOCosmogony - Origin of the UniverseNature of Go.docx
WEEK 5SHINTOCosmogony - Origin of the UniverseNature of Go.docx
 
Week 5 mini-questionsJavier is retiring from the JKL Partnership.docx
Week 5 mini-questionsJavier is retiring from the JKL Partnership.docxWeek 5 mini-questionsJavier is retiring from the JKL Partnership.docx
Week 5 mini-questionsJavier is retiring from the JKL Partnership.docx
 
Week 4Atleast 200 wordsWhat were some differences between Byzant.docx
Week 4Atleast 200 wordsWhat were some differences between Byzant.docxWeek 4Atleast 200 wordsWhat were some differences between Byzant.docx
Week 4Atleast 200 wordsWhat were some differences between Byzant.docx
 
Week 4Cardiovascular DisordersVeins and arteries are vital eleme.docx
Week 4Cardiovascular DisordersVeins and arteries are vital eleme.docxWeek 4Cardiovascular DisordersVeins and arteries are vital eleme.docx
Week 4Cardiovascular DisordersVeins and arteries are vital eleme.docx
 
Week 4Team Building Please respond to the followingReflect on.docx
Week 4Team Building Please respond to the followingReflect on.docxWeek 4Team Building Please respond to the followingReflect on.docx
Week 4Team Building Please respond to the followingReflect on.docx
 
Week 4 Quiz1.According to a study cited by the U.S. Census.docx
Week 4 Quiz1.According to a study cited by the U.S. Census.docxWeek 4 Quiz1.According to a study cited by the U.S. Census.docx
Week 4 Quiz1.According to a study cited by the U.S. Census.docx
 
Week 5 Discussion - Restructuring Decisions & CommunityAlmost all .docx
Week 5 Discussion - Restructuring Decisions & CommunityAlmost all .docxWeek 5 Discussion - Restructuring Decisions & CommunityAlmost all .docx
Week 5 Discussion - Restructuring Decisions & CommunityAlmost all .docx
 
Week 4 Homework QuestionsQuestions 1 and 2 were taken directly f.docx
Week 4 Homework QuestionsQuestions 1 and 2 were taken directly f.docxWeek 4 Homework QuestionsQuestions 1 and 2 were taken directly f.docx
Week 4 Homework QuestionsQuestions 1 and 2 were taken directly f.docx
 
Week 4 Project - STAT 3001Student Name Date.docx
Week 4 Project - STAT 3001Student Name Date.docxWeek 4 Project - STAT 3001Student Name Date.docx
Week 4 Project - STAT 3001Student Name Date.docx
 
Week 6 - Discussion 1 Your initial discussion thread is .docx
Week 6 - Discussion 1 Your initial discussion thread is .docxWeek 6 - Discussion 1 Your initial discussion thread is .docx
Week 6 - Discussion 1 Your initial discussion thread is .docx
 
Week 4 Forum ModernismDUE WED 123015 9PMPart I Identif.docx
Week 4 Forum ModernismDUE WED 123015 9PMPart I Identif.docxWeek 4 Forum ModernismDUE WED 123015 9PMPart I Identif.docx
Week 4 Forum ModernismDUE WED 123015 9PMPart I Identif.docx
 
Week 4 assignment is due 1916Writea summary of no more than .docx
Week 4 assignment is due 1916Writea summary of no more than .docxWeek 4 assignment is due 1916Writea summary of no more than .docx
Week 4 assignment is due 1916Writea summary of no more than .docx
 
Week 4 - AssignmentCreating a Unit Plan Once you’ve gotten.docx
Week 4 - AssignmentCreating a Unit Plan Once you’ve gotten.docxWeek 4 - AssignmentCreating a Unit Plan Once you’ve gotten.docx
Week 4 - AssignmentCreating a Unit Plan Once you’ve gotten.docx
 
Week 3 Whats My Style PresentationWeek 3 Whats My Style Pr.docx
Week 3 Whats My Style PresentationWeek 3 Whats My Style Pr.docxWeek 3 Whats My Style PresentationWeek 3 Whats My Style Pr.docx
Week 3 Whats My Style PresentationWeek 3 Whats My Style Pr.docx
 
Week 3 readings and videosWrite a 350- to 700-word paper in whic.docx
Week 3 readings and videosWrite a 350- to 700-word paper in whic.docxWeek 3 readings and videosWrite a 350- to 700-word paper in whic.docx
Week 3 readings and videosWrite a 350- to 700-word paper in whic.docx
 

Recently uploaded

Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........LeaCamillePacle
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxsqpmdrvczh
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 

Recently uploaded (20)

9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........Atmosphere science 7 quarter 4 .........
Atmosphere science 7 quarter 4 .........
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 
Romantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptxRomantic Opera MUSIC FOR GRADE NINE pptx
Romantic Opera MUSIC FOR GRADE NINE pptx
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
 

Week 3-4 Programming AssignmentCore Learning Outcomes addressed in.docx

  • 1. Week 3-4 Programming Assignment Core Learning Outcomes addressed in this assignment: Demonstrate creativity and problem-solving skills. (9) Write C++ programs that use proper style and documentation. (10) Write C++ programs that use Pointers and dynamic memory allocation. (11) Write C++ programs that uses Function Templates. (11) Its is C++ program Grading Information: This Lab Homework is worth 76 points and due by Sunday of week 4 at midnight CST. The purpose of this assignment is to assess if you can create a program that uses pointers, templates, and dynamic memory allocation. Two files are required to make this program work, d_random.h and d_vector.h. Both files are available in the “Doc Sharing” area. Directions Points The file must be called week3-4Prog.cpp This program will store in miniVector v a list of 15 random integers from 0 to 99, then it will output the vector, sort the vector, then output it again sorted. The miniVector class is on page 250. 5 Program Definition 1. Create program definition with the following templates and methods: // output miniVector v
  • 2. template void writeMiniVector(const miniVector& v); // use insertion sort to place miniVector v in descending order template void sortMiniVector(miniVector& v); 6 Main Method 1. Declare: miniVector v; 2. Declare: randomNumber rnd; 3. call v.push_back(rnd.random(100)); to push 15 entries from 0-99 onto the vector 4. call writeMiniVector to output vector 5. call sortMiniVector to sort the vector 6. call writeMiniVector to output the sorted vector. After you output the sorted vector: Include: system("PAUSE"); after your output to pause the screen. 10 writeMiniVector Method (const miniVector& v) 1. Iterate through the vector v and output each element to the screen. 20 sortMiniVector Method (miniVector& v) 1. Sort the elements of vector v. 2. Since it is passed-by-reference, no return is necessary. 20 Ensure you include ALL .cpp file(s) and any associated, student-defined .h (header) files required to make your program compile and run. The only files in the dropbox should be .cpp and .h files. Do not turn in .zip, .exe, .rar, etc files. 10
  • 3. Upload your page to the Dropbox. NOTE : Complete your activity and submit it to the Dropbox by clicking on the Dropbox tab at the top of the course frame and choosing the correct Weekly Activity. If needed, click on the Help button above for more information on Course Tools/Using the Dropbox . 5 Total Possible Points 76 Example output of your program Original: 59 18 60 91 49 47 83 93 55 52 15 36 83 56 91 Sorted: 93 91 91 83 83 60 59 56 55 52 49 47 36 18 15