Project (25% Final Exam Grade) Part1 (No submission needed): In Part1.cpp file, write a series of five functions that determine if a given positive integer is EVEN, ODD, PRIME, PERFECT and ABUNDANT....

1 answer below »
there are parts to the CPP file. for c++...


Project (25% Final Exam Grade) Part1 (No submission needed): In Part1.cpp file, write a series of five functions that determine if a given positive integer is EVEN, ODD, PRIME, PERFECT and ABUNDANT. Each of these functions should accept a single integer as an argument and return whether the integer meets the criteria for that classification. Below is the description of each function: • Function name: is_even • Function arguments: a positive integer • Function processing: determines if the supplied number is even • return value: boolean • Function name: is_odd • Function arguments: a positive integer • Function processing: determines if the supplied number is odd • return value: Boolean • Function name: is_prime • Function arguments: a positive integer • Function processing: determines if the supplied number is prime. a prime number is a n umber that only has two factors - the number 1 and itself. for example, 17 is prime be cause it only has two factors (1 and 17).in order to determine this you might need to count the # of factors between 1 and the number you are testing. a note on efficiency: if you aretesting a number (say, 15) and you find a factor (say, 3) - do you need to e ven continue to find additional factors? • return value: Boolean • Function name: is_perfect • Function arguments: a positive integer • Function processing: determines if the supplied number is perfect. a perfect number is a number that is equal to the sum of its factors (i.e. the number 6 is perfect because 6 = 1 + 2 + 3) • return value: Boolean • Function name: is_abundant • Function arguments: a positive integer • Function processing: determines if the supplied number is abundant. an abundant number is a number that is less than the sum of its factors (i.e. the number 12 is abundant b ecause 12 < 1 + 2 + 3 + 4 + 6) • return value: boolean run your code to test it!!! make sure that your functions work as desired, by getting the following output: false true true false true false true false false true false false part2 (submission needed): • once you're happy with your functions, copy/paste all functions prototypes/implementations from part1.cpp into part2.cpp, then write a short program to prompt the user for a starting and ending number (both integers) - ensure that the first number is positive, and that the second number is greater than the first number. • then use your functions to analyze all numbers in this range to and generate output similar to the following sample run: sample run: enter starting number: -5 invalid, try again enter starting number: 5 enter ending number: 0 invalid, try again enter ending number: 30 5 is ... odd prime 6 is ... even perfect 7 is ... odd prime 8 is ... even 9 is ... odd 10 is ... even 11 is ... odd prime 12 is ... even abundant 13 is ... odd prime 14 is ... even 15 is ... odd 16 is ... even 17 is ... odd prime 18 is ... even abundant 19 is ... odd prime 20 is ... even abundant 21 is ... odd 22 is ... even 23 is ... odd prime 24 is ... even abundant 25 is ... odd 26 is ... even 27 is ... odd 28 is ... even perfect 29 is ... odd prime 30 is ... even abundant 1- you need to submit part2 only (part1 won’t be graded). 2- rename the file part2.cpp such as yourfirstname_lastnamefinalproject.cpp. 3- your output should be similar the output above. 4- if the program does not run you will receive a grade of zero. 5- only “.cpp” file will be accepted (other type of files will receive a grade of zero). 6- respect the due date monday 12/06/2021 before class. 1="" +="" 2="" +="" 3="" +="" 4="" +="" 6)="" •="" return="" value:="" boolean="" run="" your="" code="" to="" test="" it!!!="" make="" sure="" that="" your="" functions="" work="" as="" desired,="" by="" getting="" the="" following="" output:="" false="" true="" true="" false="" true="" false="" true="" false="" false="" true="" false="" false="" part2="" (submission="" needed):="" •="" once="" you're="" happy="" with="" your="" functions,="" copy/paste="" all="" functions="" prototypes/implementations="" from="" part1.cpp="" into="" part2.cpp,="" then="" write="" a="" short="" program="" to="" prompt="" the="" user="" for="" a="" starting="" and="" ending="" number="" (both="" integers)="" -="" ensure="" that="" the="" first="" number="" is="" positive,="" and="" that="" the="" second="" number="" is="" greater="" than="" the="" first="" number.="" •="" then="" use="" your="" functions="" to="" analyze="" all="" numbers="" in="" this="" range="" to="" and="" generate="" output="" similar="" to="" the="" following="" sample="" run:="" sample="" run:="" enter="" starting="" number:="" -5="" invalid,="" try="" again="" enter="" starting="" number:="" 5="" enter="" ending="" number:="" 0="" invalid,="" try="" again="" enter="" ending="" number:="" 30="" 5="" is="" ...="" odd="" prime="" 6="" is="" ...="" even="" perfect="" 7="" is="" ...="" odd="" prime="" 8="" is="" ...="" even="" 9="" is="" ...="" odd="" 10="" is="" ...="" even="" 11="" is="" ...="" odd="" prime="" 12="" is="" ...="" even="" abundant="" 13="" is="" ...="" odd="" prime="" 14="" is="" ...="" even="" 15="" is="" ...="" odd="" 16="" is="" ...="" even="" 17="" is="" ...="" odd="" prime="" 18="" is="" ...="" even="" abundant="" 19="" is="" ...="" odd="" prime="" 20="" is="" ...="" even="" abundant="" 21="" is="" ...="" odd="" 22="" is="" ...="" even="" 23="" is="" ...="" odd="" prime="" 24="" is="" ...="" even="" abundant="" 25="" is="" ...="" odd="" 26="" is="" ...="" even="" 27="" is="" ...="" odd="" 28="" is="" ...="" even="" perfect="" 29="" is="" ...="" odd="" prime="" 30="" is="" ...="" even="" abundant="" 1-="" you="" need="" to="" submit="" part2="" only="" (part1="" won’t="" be="" graded).="" 2-="" rename="" the="" file="" part2.cpp="" such="" as="" yourfirstname_lastnamefinalproject.cpp.="" 3-="" your="" output="" should="" be="" similar="" the="" output="" above.="" 4-="" if="" the="" program="" does="" not="" run="" you="" will="" receive="" a="" grade="" of="" zero.="" 5-="" only="" “.cpp”="" file="" will="" be="" accepted="" (other="" type="" of="" files="" will="" receive="" a="" grade="" of="" zero).="" 6-="" respect="" the="" due="" date="" monday="" 12/06/2021="" before="">
Answered Same DayNov 24, 2021

Answer To: Project (25% Final Exam Grade) Part1 (No submission needed): In Part1.cpp file, write a series of...

Kshitij answered on Nov 25 2021
106 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here