Ultimate Engineering Study Guide - Questions & Answers
In-Class 9-Reference Parameter FunctionsIn this exercise, you get practice writing functions that focus on returning information to the calling function. Please note that we are not talking about "returning" information to the user or person executing the program. The perspective here is that one function, like main(), can call another function, like swap() or calculateSingle(). Your program passes information into the function using parameters; information is passed back "out" to the calling function using a single return value and/or multiple reference parameters. A function can only pass back I piece of information using the return statement. Your program must use reference parameters to pass back multiple pieces of information.There is a sort of hierarchy of functions, and this assignment uses each of these:1. nothing returned by a function - void functions 2. 1 value returned by a function using a return value3. 2 or more values returned by a functiona. a function uses 2 or more reference parameters (void return value) b. a function uses a return value and reference parametersThe main() function is provided below. You must implement the following functions and produce the output below:1. double Max Numbers(double num1, double num2),a) Prompt and read 2 double in main()b) num and num2 not changedc) Return the larger one between num1 and num2 d) If num1 equals num2, return either one of them2. Int calcCubeSizes(double edgeLen, double&surfaceArea, double& volume); a)pass by value incoming value edgeLenb) outgoing reference parameters surfaceArea and volume are set in the functionc) return 0 for calculations performed properlyd) you return -1 for failure, like edgelen is negative or 03. int split Number(double number, int& integral, double& digital), a) pass by value incoming number as a doubleb) split the absolute value of incoming number in two parts, the integral part and digital (fraction) partc) outgoing reference parameters integral and digital are set in the function d) retrun 0 for calculation performed properly, return I if there is no fractional part, i.e. digital-0. And output "Integer number entered!"4. int open AndReadNums(string filename, ifstream&fn, double&num 1, double &num2); a) pass by value incoming file name as a stringb) outgoing reference parameter ifstream fin, which you open in the function using the filenamec) read 2 numbers from the file you open, and assign outgoing reference parameters numl and num2 with the numbers 3.
The task is to build a React Native app that can run on Android and iOS that satisfies the following requirements:Must use React Native for front end, Firebase for the data and backend.1. Must have a register/login screen. There are 2 types of users that can register. user 1: Supplier. User 2: Retailer.Supplier must supply their company name, contact, email, company registration number and have a button to upload documents.Retailer must supply their company name, contact, email, company registration number and have a button to upload documents.The administrator vets the supplier documents loaded and then approves/declines the supplier based on the documents. If declined, then the supplier receives an email informing them. If approved, then the supplier receives an email informing them and can now uplaod their products to the app.The retailer once they login goes to a screen that will display a list of suppliers. The retailer can select a supplier. Once the supplier is selected, the retailer can view a screen that gives a stock take number of the amount of stock the supplier has and based on that stock the retailer can select the amount of the item they wish to purchase. Once the amount is selected then they click confirm order.Once confirmed, the supplier sees that they have an order of the amount selected and can confirm they will process the amount. once confirmed, then the retailer can see that the supplier has confirmed the order. Now based on the amount of the item and the price the supplier has noted their item as will generate an invoivce and automatically send this to the retailer for payment.
Given a hash table of size n = 8, with indices running from 0 to 7, show where the followingkeys would be stored using hashing, open addressing, and a step size of c = 3 (that is, if thereis a collision search sequentially for the next available slot). Assume that the hash function isjust the ordinal position of the letter in the alphabet modulo 8 in other words, f(a) = 0, f(b)= 1, , f(h) = 7, f(i) = 0, etc.a, b, i, t, q, e, nWhy must the step size c be relatively prime with the table size n? Show what happens in theabove if you select a step size of c = 4.