c) An electrical store will award their customers with reward point based on their spending as follows : • For each RMS spending, one point is given. • If the customer spent more than RM1000, extra 50 points is awarded. @ Write a C++ function named CountRewardPoint that accepts total spending as parameter, then calculates and returns the total points given by the electrical store. For example ; if spending is RM84, then total reward point earned is 16. However, if spending is RM1004, then total reward point earned is 250. Write a fragment of code in C++ that asks user to enter the total spending and calls the function CountRewardPoint, then display the total points earned.
Q: I'm looking for extensive information as well as a user's guide for Microsoft network monitor 3.1.
A: Microsoft Network Monitor 3.1: An Introduction Microsoft Network Monitor 3.1: On Vista, wireless (80...
Q: What is the origin of the term "direct access device" for magnetic disks?
A: Introduction: A direct-access storage device (DASD) is another term for secondary storage devices, s...
Q: Give an example of a UML timing diagram.
A: Timing diagrams are part of Interaction diagrams in UML, which do not use the same notations as sequ...
Q: Computer Networks - Internet Architecture & Application Layer Please answer the question Someon...
A: The local file hosts.txt can be used on a system instead of the DNS. According to company policies ...
Q: how you could implement a queue's enqueue and dequeue operations
A: Here we have to describe implementation of queues enqueue and dequeue operation using 2 stacks.
Q: Write any JAVA program of your choice. Create your own JAVA annotations. Execute your program succes...
A: Explanation: Annotation: An annotation always begins with the symbol @ and ends with the name of th...
Q: why computer programming iis necessary to interact with the computer effictively? Discuss the role o...
A: answer is
Q: The output of an in-order traversal of a binary tree is ACTION, and the output of the post-order tra...
A: By preparing graph answer is:
Q: What influence does data mining have on personal privacy and security?
A: Introduction: Data extraction from data sets can be accomplished using privacy-protected data mining...
Q: f a process fails, the error information is often sent to a) a new file, b) another ongoing process,...
A: Intro The question is about If a process fails, the error information is often sent to a) a new file...
Q: Discuss RFID and near field communication (NFC), as well as the problems and security considerations...
A: Introduction: Near-field communication (NFC) and radio frequency identification (RFID) (NFC)RFID is ...
Q: Authenticity Confidentiality Integrity
A: given - Which category or categories of the C.I.A.A. framework best describe your cyber attack? Grou...
Q: Develop 7 problem statements (propositions) and develop the solution. Complex query should have fro...
A: We have one model which contains 5 or more tables each table has it own unique private key and forei...
Q: WHAT EXACTLY IS A BYZANTINE GENERALS PROBLEM IN DIGITAL CASH TRANSACTIONS
A: Byzantine Generals Problem can be described as the trouble of decentralized frameworks having settl...
Q: credible and high-ranking journals and articles and answer the question, "What makes a model a good ...
A: The answer for the given question is as follows.
Q: take the minimized picture into the center of the original picture
A: Syntax: Icropped = imcropIcropped = imcrop(I)Xcropped = imcrop(X,cmap)___ = imcrop(h)Icropped = imcr...
Q: Create a program that will ask user to input two numbers and choose from the four mathematical opera...
A: This question comes from Programming Language which is a paper of Computer Science. We have to creat...
Q: Write a program to convert a US Customary System length in miles, yards, feet and inches to a Metric...
A: Logic:- read miles, yards, feet and inches. Use formula to calculate total_inches,total_meters and...
Q: Every day, you receive at least ten new emails in your inbox. What is the most effective way to stru...
A: Basics Electronic mail is a method of exchanging communications ("mail") between people who use elec...
Q: Write a program (WAP) to create an undirected graph using adjacency matrix representation. Number of...
A: Introduction: Write a program (WAP) to create an undirected graph using adjacency matrix representat...
Q: What is the difference between PRISM and Pegasus spyware software?
A: Introduction: The next step compares and contrasts the spyware software PRISM and PEGASUS.
Q: In the space below. create your own Mind Map. Add key information you have taken from activity 122.
A: Here is the detailed explanation of the mindmap.
Q: In Linux, name three standard streams.
A: - We need to talk about the standard streams in Linux.
Q: Write a program in C++ to insert a new node at the end of a Singly Linked List. Test Data and Expect...
A:
Q: iv) Write a Python program to input two integers t1, t2 from the user and then find the value of the...
A: Code : Output :
Q: Describe the four (4) constraints of syntactic analyzers.
A: Introduction: The syntactic analyzer is defined as the generation of a basic parse tree, which might...
Q: What is the definition of a high-level programming language?
A: Introduction: A high-level language (HLL) is a programming language, such as C, FORTRAN, or Pascal, ...
Q: ocomputer Trainer have an input device that will be used when it is necessary for the trainer to pro...
A: given - In which of the following ways does the MC8088/EV Microcomputer Trainer have an input device...
Q: What function did we use to display a single row function in database?
A: The solution to the given problem is below.
Q: Write a program called alice_words.py that creates a text file named alice_words.txt containing an a...
A: Python code to count no of occurrence of each word import string text = open("alice_words.txt", "r"...
Q: Is it true that the external bus in the von Neumann design is just for data memory?
A: Introduction: The von Neumann architecture was created to store program and instruction data in the ...
Q: Java programming Question. How can i find the reverse the letters present in the user entered String...
A: Required:- Java programming Question.How can I find the reve...
Q: erform a comparative analysis that studies the collision rates for various hash codes for character ...
A: SUMMARY: -Hence, we discussed all the points.
Q: Decide on three new approaches to software development, each representing a shift away from rigid ad...
A: Multiple approaches and models for tracking the progress of a software project, as well as the proje...
Q: Express the following decimal numbers as 5211 code numbers. 31. 36 33. 45.26 32. 297 34. 106.31 Expr...
A: Here, we are going to convert decimal numbers into 5211 code numbers and also few numbers convert fr...
Q: Describe when you would want to utilize embedded SQL over SQL alone or a general-purpose programming...
A: SQL can be embedded in a programming language, allowing the host language to use SQL structures.
Q: This is very confusing for me; we cant use import statements; Please create code for me with the f...
A: Given :- MCS Roast Being tired of the challenging assignments given by the MCS Professors, students ...
Q: What are the most important benefits of data mining?
A: Intro The question is about the most important benefits of data mining and here is the solution in t...
Q: In this section, we will look at the function that wireless networks play in developing countries. W...
A: -The wireless network allows the average man in developing countries to connect to the rest of the g...
Q: Brief explanation: What is Compiler? What is Interpreter? Main question: What is the difference of c...
A: Introduction Brief explanation: What is Compiler? What is Interpreter? Main question: What is the ...
Q: 1.Define a JavaScript function that takes a parameter and prints the datatype of that parameter in t...
A: Define a JavaScript function that takes a parameter and prints the datatype of that parameter in the...
Q: ment is a term
A: given - The prototype technique of software development is a term that means different things to dif...
Q: DISCUSS THE PROBLEMS INVOLVED BY DIGITAL CASH TRANSACTIONS?
A: What is Digital Cash Transactions: A digital transaction converts a traditional cash-operational soc...
Q: What are the many types of general concerns that might affect software?
A: Introduction: Software is defined as instructions, data, or programs used to run machines and execut...
Q: Do you know what the technical term is for robotic optical disk library devices?
A: First let's understand what is robotic optical disk library . As the name suggest we can easily ide...
Q: Code 2.2 is for a program that demonstrates variable declarations and the use of literal and symboli...
A: 1. What are the two symbolic constants used? 2. Show two methods of defining a symbolic constant nam...
Q: In Java, explain public static void main(String args[])
A: The problem is based on the basics of java programming language.
Q: java singly linked list use the template below to solve the problem USE THE TEMPLATE!!!!!!!!!!!!!...
A: To create singly linked List, we have to add Citizen class as node in it.
Q: Describe block distribution. Parallel processing backs up your response with examples and graphics.
A: Parallel processing refers to the simultaneous processing of several assignments across multiple pro...
Q: Describe when you would want to utilize embedded SQL over SQL alone or a general- purpose programmin...
A: What is embedded SQL: Embedded SQL is a method of combining the computing power of a programming lan...
C++
Step by step
Solved in 2 steps with 1 images
- Mark the following statements as true or false: a. To use a predefined function in a program, you need to know only the name of the function and how to use it. (1) b. A value-returning function returns only one value. (2, 3) c. Parameters allow you to use different values each time the function is called. (2, 7, 9) d. When a return statement executes in a user-defined function, the function immediately exits. (3, 4) e. A value-returning function returns only integer values. (4) f. A variable name cannot be passed to a value parameter. (3, 6) g. If a C++ function does not use parameters, parentheses around the empty parameter list are still required. (2, 3, 6) h. In C + + , the names of the corresponding formal and actual parameters must be the same. (3, 4, 6) i. A function that changes the value of a reference parameter also changes the value of the actual parameter. (7) j. Whenever the value of a reference parameter changes, the value of the actual parameter changes. (7) k. In C++, function definitions can be nested; that is, the definition of one function can be enclosed in the body of another function. (9) l. Using global variables in a program is a better programming style than using local variables, because extra variables can be avoided. (10) m. In a program, global constants are as dangerous as global variables. (10) n. The memory for a static variable remains allocated between function calls. (11)(Numerical) Heron’s formula for the area, A, of a triangle with sides of length a, b, and c is A=s(sa)(sb)(sc) where s=(a+b+c)2 Write, test, and execute a function that accepts the values of a, b, and c as parameters from a calling function, and then calculates the values of sand[s(sa)(sb)(sc)]. If this quantity is positive, the function calculates A. If the quantity is negative, a, b, and c do not form a triangle, and the function should set A=1. The value of A should be returned by the function.JAVA CODE PLEASE Functions With No Parameters and Return Values Practice ll by CodeChum Admin Create a program that has a global integer variable assigned to a value of 1. Then, create a new function named increment that increments the global variable. In the main function, if the current value of the global variable is divisible by 3, print “Cody!”. Otherwise, print the value of that global variable. Repeatedly call the increment function until the value of the global variable is greater than 15. Output Multiple lines containing a string or an integer 1 2 Cody! 4 5 Cody! 7 8 Cody! 10 11 Cody! 13 14 Cody! Score:
- Python onlyYour program should ask the user to input a number of family members. The program should then repeatedly ask the user to input the age of a family member until the specified number of family members is reached. Finally, the program should output the average age of the family members based on the input values. If the user inputs zero for the number of family members, the program should output a friendly message informing the user that at least 1 family member is required. A function has already been defined for you which asks the user for the age of a family member. You must use this function as part of your solution. Your solution must be implemented using a for loop on a range.add on to this: def ask_for_age(): age = int(input('Enter the age of a family member: ')) return age number = int(input('Number of family members: ')) # Write your solution herePython XYZ store plans to give a festival discount to its customers. The store management has decided to give discount on the following criteria: Shopping Amount Discount Offered >=500 and <1000 5% >=1000 and <2000 8% >=2000 10% An additional discount of 5% is given to customers who are the members of the store. Create a program using user defined function that accepts the shopping amount as a parameter and calculates discount and net amount payable on the basis of the following conditions:Net Payable Amount = Total Shopping Amount – Discount.PYTHON Question 3: Rain or Shine Part 1: Alfonso will only wear a jacket outside if it is below 60 degrees or it is raining. Write a function that takes in the current temperature and a boolean value telling if it is raining and it should return True if Alfonso will wear a jacket and False otherwise. Try solving this problem with a single line of code. def wears_jacket(temp, raining): """ >>> wears_jacket(90, False) False >>> wears_jacket(40, False) True >>> wears_jacket(100, True) True """ *** YOUR CODE HERE *** Note that it should either return True or False based on a single condition, whose truthiness value will also be either True or False. Part 2: Rewrite the above function with a lambda expression.
- cemaining Time: 41 minutes, 23 seconds. Question Completion Status: 70 points Sav QUESTION 4 Write a C++ function (not a program), that is passed a positive integer value. The function prints all the even numbers between 0 and that value. The function does not return any values to the calling function. The function is called by the following statement: evensteven (num) ; TT T T Paragraph Arial : 3 (12pt) * D O Q T T. O f Mashups 田 田图□m HTML CSS Click Save and Submit to save and submit. Click Save All Answers to save all answers. Save All Answers Close Window Save and Submit APR 19 Pro 80 888 esc F2 F3 F4 F5 F6 F7 @ # $ % * 2 3 4 Q W E T Y RThis is c programming question. Use function please for solving. Question: (The function that returns letter grade according to midterm and final grade) : The function turn_to_letter decides on the letter grade of the student according to the table below from the visa and final grades sent into it and returns it, write it together with a main function which the turn_to_letter function is called and prints the letter equivalent on the screen. - Success score = 40% of midterm + 60% of final, - F for the success score below 50, D for between 50 and 59, C for between 60 and 69, B for between 70 and 79, A for 80 and above.The following formula can be used to determine the distance an object falls due togravity in a specific time period:d =112 gt2The variables in the formula are as follows:• d is the distance in meters,• g is 9.8,• and tis the time in seconds that the object has been falling.Write a function named fall i ngDi stance that accepts an object's falling time (in seconds)as an argument. The function should return the distance, in meters, that the object hasfallen during that time interval. Write a program that demonstrates the function by callingit in a loop that passes the values 1 through 10 as arguments and displays the return value.
- Pakistan online Daraz company has four agent (1 to 4) who sell 5 different products ( 1 to5). Once per day, each agent passes in a slip for each different type of product sold. Every agentpasses in between 0 to 5 slips each day. Each slip has the following information on it: The agent number The product number Total rupees of that product sold that day.Write a program in C++ that will read all this information for last month’s sales and brief thetotal sales by agent by product. The output should be in tabular form.Hi A game is played in which a single dice is tossed. If the result is 4 or 6, the player wins. If the result is 1 or 3, the player loses. If the result is 2 or 5, the player continues to roll the dice until a win or a loss occurs. A complete C++ function game() is given below, re-write the function with switch-case statement.LeakageDeduction.py Write a python program that calculates the salary deduction of an employee who spills more petrol. The program should accept previous reading, current reading and quantity of petrol loaded in n number of petrol pumps. The petrol price per gallon is fixed to OMR 0.180. The value of n must be accepted as input. The program must define and use a function to calculate the Leakage quantity and deduction amount. The Leakage quantity is calculated using the following formula: Leakage - Quantity loaded -(Current Reading - Previous Reading) The deduction amount is calculated by multiplying leakage with the rate of petrol per gallon. The company has declared not to deduct full amount from employee's salary due to pandemic. Following table must be used to find the actual salary deduction: Deduction Amount (DA) DA<10 102DA<20 202DA<40 402DA<50 DA250 Salary 10% of DA 20% of DA 30% of DA 40% of DA 50% of DA 6. |凶 B. N M.