Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

7.I Libraries T.1.1 Problem The lirst new Libary yeu will ereate is the Moev Math Lifary (musath.h), which will coetain a shecion of new math

image text in transcribed
image text in transcribed
7.I Libraries T.1.1 Problem The lirst new Libary yeu will ereate is the Moev Math Lifary (musath.h), which will coetain a shecion of new math functions will you may find axcful in this course, iacbuding the ability to check if aumbers are peime or finding the GCD of two integers. If yos asen't sure what something b, os how it woelos, feel free to book up their definitioes in the interset. Yoe mat fiud scene of the definitions in ether contract instruntions. The sevond new library will be the Moce Strings (mstring-b) library, which will contain a strime revenol functicu, 7.1.2 Preconditions Your math.b heoder fibe will contais forward definition and any uecessury latcary imports to emsure the proper opesathon of your fusctious. Yoa mubt also wrise as accenpanying munathe fibe coutainibe all of the matdiing fuection ingplementatioes. When yos eampile, you will nexd to inelale the somee file in your comenimil in abder to ensure the ftinctions exist thuring the linking procrs. You may not inclade any additional helper functions in these library files, as that they could break the structure of the library! Your munath liligary must indule the following functions: Your mistring library must inclucle the followieg functions: 7.1.3 Postconditions The liberary files aend to exist, the functions need to seturn the corroct valaes for thrir juopoos, and everything mest congyile. Your mastring lihtary nuat inclode the following functiotas: 7.1.3 Postconditions The litrary files nexdl to exist, the functions need to retura the eocrect values for their purpores, and everythine mest. conspilier. 7.1.4 Festrietions No struess, no manual nsenory allocation. We havea't lewerned pointers yet, tute forl free to ase thrm. 10 7,1,5 File Requirements manath.h and mstring.h. Your hender files shaibd contain your forwand declarationas. Your souree files must mat contain any main fanctiots, or it will fail duriag teofings. Your souree and beader files stoculd be placed in the Lab3/lib/ ditectory in your Git Labs nepoitory. 7.1.6 Testing To teat your code, you can compele yoer smire tibes with the mathM.o or string M.a abject fils foumd in Cl/objects/lib/. It can then be executed as mennal. The object files contain main fuarticas st you do not need te jeoside your emb: char vilus. IBe sare to test this (and your other fiznetiots) on wome alternative cams to ensure that youre allle to correctly piroduce the reyuired resalts. When renling the output for the blieve fanction on your pipeline, you will see the results of bitreve fanction calls. as strange choracters. This is noxinal and catoed to the rewered value of the dhararter not being foutd on the ASCII table. We recocamend you fint test your bitrreve by interpreting ehars as undigned 8-bet integres sather than ASCIl ctaracters. You can print the teumerical vahhe of a char using the 'Kd format specifiec. Writne your arwe inatim fusctioe for testinge puspeses can make yoter life much eaviet. 7.1.7 Sample lnputs and Outputs Sample inpats and outputs are available via the object files. Whin executed, thry will oedpet sarness and emor moseagos, along with the parametrse used to teet thrm

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions