SophiaPretty

(5)

$14/per page/Negotiable

About SophiaPretty

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing Hide all
Teaching Since: Jul 2017
Last Sign in: 304 Weeks Ago, 5 Days Ago
Questions Answered: 15833
Tutorials Posted: 15827

Education

  • MBA,PHD, Juris Doctor
    Strayer,Devery,Harvard University
    Mar-1995 - Mar-2002

Experience

  • Manager Planning
    WalMart
    Mar-2001 - Feb-2009

Category > Computer Science Posted 12 Jan 2018 My Price 8.00

example ofclient code calling that function

C++

Part 1: Please write the function declaration (only the declaration, no definition) and 1-2 lines of code after that giving an example ofclient code calling that function. Please pay special attention to the parameters and their types, whether they are passed by value or by reference, and the return type. If the value of the parameter is numeric and the number does not have to be a whole number, double should be given preference over int.

 

e.g:

double add (double a, double b);

double total = add(2, 3);

 

1) A function named minVal which takes two numbers and returns the min of the two.

2) A function named inRangeLoHi which takes three parameters lo, hi, and val and returns whether or not val is in the range [lo, hi]

3) A function named isVowel which takes a letter and returns whether or not that letter is a vowel.

4) A function named letterAfter which takes a letter and a number n and returns the letter in the alphabet n positions after that letter

(z wraps back to a).

5) A function named displayGreeting which displays some constant greeting to the user.

6) A function named incrementAll which takes 3 numbers and increments each by one.

7) A function named getInput which takes 2 numbers as parameters and asks the user to provide values for those two numbers.

 

Part 2: Please describe very briefly (2-3 lines) if the clients of the functions need to know their definition to be able to use them. Why or why not?

 

Part 3: Assuming the functions in Part 1 exist, write a function (definition) called inRange which takes two numbers end1 and and end2 and a number val and returns whether val is in the range defined by [smallerEnd, higherEnd] depending on whether end1 or end2 is smaller. Your function must rely on existing functions above to do its work and it should do as little work of its own as possible.

Answers

(5)
Status NEW Posted 12 Jan 2018 11:01 AM My Price 8.00

-----------  ----------- H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly

Not Rated(0)