
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question

Transcribed Image Text:Project Creation:
Create a C++ empty Project that has one header file (header.h) and two source files
(implementation.cpp and main.cpp).
User Defined Functions:
Define the following functions. Write the function prototypes in header.h and the function
definitions in implementation.cpp
1- Function overloading F.O: Remember to implement F.O you have to change one or all
of the number or type or order of parameter list in the function signature.
AllinInterval: This function prints all numbers within an interval in descending order
starting from the last number lasting to the first of the interval decrementing by specified
value based on the type of arguments passed when calling the function.
Hint: Two overloaded versions of the function should be written.
The first version should take Three double arguments (First, Last and Increment)
The second version should take Three integer arguments (First, Last and Increment).
It's a good practice to print a different message for each version.
2- Default Arguments D.A: Remember to implement this Idea you have to write the default
values in the function prototype only.
CalculateEqu: This function calculates and returns the value of the equation
Y=7X + 2W+Z
Based on the user inserting the values of X, W and Z
So the function should take three double arguments (X, W and Z), and return the value
of Y as double. If one or all inputs is/are not passed, the function should consider them
1, 2 and 3 respectively.
3- Call by reference: Remember to implement this idea, the & operator only provided in the
Function prototype and definition only.
RectangleInfo: This function calculates and returns both the area and the circumference
of a Rectangle. The function should take two double argument (height and width )
Hint: to return more than one output, define them in the argument list preceded by &
operator.
4- printMenu: This function displays the following menu at the screen. The function
should return an integer value that counts the number of times this function is called so
far.
Main Menu
1- AllinInterval Integer version.
2- AllinInterval Double version.
3- CalculateEqu.
4- RectangleInfo.
5- Exit.
Spring 2021
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 3 steps with 1 images

Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Add 3 parameters to each function in the code below. ********************************************* Code starts here ************************************************** Module.py #Defination to sort the list def sort(listNum): sortedList = [] #While loop will run until the listNum don't get null while(len(listNum) != 0 ): #Set the min as first element in list min = listNum[0] #iterate over the list to compare every element with num for ele in listNum: #If element is less than min if ele < min: #Then set min as element min = ele #append the sorted element in list sortedList.append(min) #Remove the sorted element from the list listNum.remove(min) return sortedList #Function to find the sum of all elements in list def SumOfList(listNum): #Set the sum as zero sum =0 #Iterate over the list to get every element for ele in…arrow_forwardWrite a function which will swap its arguments if the first argument is greater than its second argument,but will not interchange them if the first argument is smaller than or equal to the second argument. Thefunction should return 1 if a swap was made, and 0 otherwise.(Hint: Make sure to use call by reference.)Write also a short test driver(i.e. a main() invoking your function). C++arrow_forwardGiven the following functions:void sum(int a, int b, int total) { total = a+b;}int main() { int x=1, y=2, s=0; sum(x,y,s); cout << s << "\n"; return 0;}1. Explain the problem with the sum function.2. Explain how to fix the problem without changing the main function.arrow_forward
- (Square of Asterisks) Write a function that displays a solid square of asterisks whose side isspecified in integer parameter side. For example, if side is 4, the function displays: **** **** **** ****arrow_forwardWrite a function definition called AddPoints that has one integer parameter called points & the function returns an integer. (in C). Inside the function, declare, ask, & get an integer from the user (the bonus points), add the bonus points to points thst are copied into the function & return the sum.arrow_forwardProblem 1 - Function DeclarationsWrite the prototypes for several function calls, deducing the correct signature from the context in PrototypeTester.cpp Do not implement the functions themselves. That is already done. Place the prototypes in pe04.h. Problem 2 - Write a FunctionWrite a function named datingRange() which accepts three arguments: The integer input parameter for the person's age.Two integer output parameters for minimum and maximum.Your function should fill the minimum/maximum integers with the person's xkcd "dating range" as described in the following web comic strip:arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education