Write a C++ program to calculate a rectangle's area. The program consists of the following function: • getLength - This function should ask the user to enter the rectangle's length, and then returns that value as a double • getWidth - This function should ask the user to enter the rectangle's width, and then returns that value as a double. getArea - This function should accept the rectangle's length and width as arguments and return the rectangle's area. displayData - This function should accept the rectangle's length, width and area as arguments, and display them in an appropriate message on the screen. main - This function consists of calls to the above functions.
Q: For each of the following, give the Big-Oh runtime in terms of n (if applicable) (not i). (a)…
A: Big-Oh notation is the parameter used to analyze the algorithm cost in terms of time. It is used to…
Q: Write a scenario that could be used to help design tests for the wilderness weather station system.
A: WILDERNESS WEATHER STATION SYSTEM SCENARIO BASED ANALYSIS The weather station is made up of several…
Q: Assume that TCP implements an extension that allows window sizes much larger than 64 KB. Suppose…
A: Using the slow start, the sending rate is increased exponentially rather than linearly. The windows…
Q: Design a class named Cake. Data fields include two string fields for cake flavor and icing flavor…
A: Diagram Cake - cake flavor: string - icing flavor: string - diameter: num - price: num + set cake…
Q: Assume that TCP implements an extension that allows window sizes much larger than 64 KB. Suppose…
A: a) We start with a window size of 1 KB that doubles every RTT. The mathematical way to solve this is…
Q: Can u give applications of artificial neural networks
A: The above question is solved in step 2 :-
Q: Explain why TIME. WAIT is a somewhat more serious problem if the server initiates the close than if…
A: As the server often participates in much more connections than clients, the server's record-keeping…
Q: Provide an example of how to achieve encapsulation in Java.
A: Java: Java is a general purpose high level programming language. It was developed by James Gosling…
Q: Select the machine code equivalent for the following Branch Instruction. Address Assembly Code 0x210…
A: The solution to the given problem is below.
Q: Q1b) Considering network design model PDIOO, answer the following: i. Mention 4 types of network…
A: Networking Personal Area (PAN) The smallest and most fundamental kind of network, a PAN centres on…
Q: (Q6, b1, Calculate the Performance Effective Access Time (EAT) of Demand Paging, where (Memory…
A: The following formula can be used to determine the demand paging system's performance effective…
Q: data = np.random.randint(0, MAX_VALUE, size=DATASIZE) • Write a function that is passed a numpy…
A: Please refer below for your reference: According to company guidelines we are restricted to answer…
Q: Suppose you have been applying for positions and you receive this email from a potential employer:…
A: A job offer can be considered as a document or mail from an employer to give you a job.
Q: What is the output of the following code? 1 #include 2 using namespace std; 3 void fun(int…
A: The above question is solved in step 2 :-
Q: Complete the following direct proof of the statement: If x and y are positive real numbers and x <…
A: x^2<xy y/x xy<y^2 xy
Q: nap model, network stablishes a TCP connection with a node on another network. You can assume that…
A: Suppose, network A with address space 192.168.1.0/24 & network B with address space…
Q: Suppose an RGB raster system is to be designed using an 8-inch x 10-inch screen with a resolution of…
A: What is Raster Graphics? Raster graphics, also known as bitmap graphics, are digital pictures made…
Q: A cybersecurity expert discovers several users with administrative rights during a security review.…
A: Access control withdrawals and restrictions are one of the most important examples of prevention and…
Q: What factors influence network communication performance?
A: Given: In terms of network performance, reaction time refers to how soon a message can be delivered…
Q: Write a Python program to show the use of the isinstance() function to check whether the value 0.5…
A: Code - x = 0.5if isinstance(x, float): print("x is float")else: print("x is not float")
Q: PROVIDE JS SOURCE CODE Design a web page with a text box (username) where the user can enter a name…
A: Html is the hypertext markup languages are used to create or design the web pages or the documents…
Q: Write a program to store an input list of five numbers in an array named list and display the…
A: SOURCE CODE IN Python def get_min(list, input_size): # get_min function # initialize smallest number…
Q: In a wide area network, how is routing accomplished?
A: the answer of the question is given below
Q: 6.6 LAB: Swapping variables Define a function named SwapValues that takes four integers as…
A: We will use the pass-by-reference method to compute this problem: It means to pass the reference of…
Q: In at least one paragraph, explain one of the following components that make up a data warehouse and…
A: Data ware which refers to the central repository of the informations that can be analyzed and to…
Q: Design an ER schema for prescription monitoring based on the given data: Patients are defined by an…
A: What is ER Diagram?ER Diagram stands for Entity Relationship Diagram, also known as ERD is a diagram…
Q: int b[100]; The array b has indices in the ranges 0-99. Select one: O True O False
A: Let's understand step by step : Array : Array is used to store elements of similar type. It is…
Q: Explain why TIME_WAIT is a somewhat more serious problem if the server initiates the close than if…
A: Introduction: The server often participates in many more connections than clients, so the server's…
Q: Following the development and testing of individual software modules, they must be combined and…
A: Introduction Software development insinuates PC programming, which is the most widely recognized…
Q: Explain why TIME. WAIT is a somewhat more serious problem if the server initiates the close than if…
A: Introduction: The TIME WAIT endpoint must maintain a record of the connection for the length of TIME…
Q: To refer to a particular location or element in the array, we first specify the array's name and…
A: The given statement is related to the use of array where an array is a collection of elements having…
Q: State whether the following are true or false. If the answer is false, explain why.d) An expression…
A: A logical operator (||) is a symbol or word that joins two or more expressions in such a way that…
Q: Name at least three tasks performed by the WinMain (startup) procedure.
A: The question has been answered in step2
Q: The following ER diagram captures important information of the Internet sales model. Analyze that…
A: Entity : An Entity may be an object with a physical existence – a particular person, car, house, or…
Q: Q5) Using RSA algorithm, Assume: p= 7 , q = 13, e = 5, d = 29. b) What is the public key and private…
A: RSA Algorithm:1) Calculate value of n = p xq, where p and q are prime no.'s2) calculate (n) = (p-1)…
Q: There are three hosts X, Y, and Z. Hosts X and Y are located at Central Park and Times Square…
A: What is a UDP socket? UDP socket routines enable simple IP communication using the user datagram…
Q: Draw an ER diagram for the following scenario: A designer has a store of designer dresses both for…
A:
Q: The_________________ statement, when executed in an iteration statement or a switch, causes an…
A: The do, for, switch, or while statement that is immediately around the break statement is…
Q: Name at least three tasks performed by the WinMain (startup) procedure.
A: Answer:
Q: raw hybrid network topology and state why did you select these types?
A: I have mentioned answer in below steps , please find in below
Q: Consider a disk with a sector size of 512 bytes, 2000 tracks per surface, 50 sectors per track, five…
A:
Q: (a) Suppose we want to change columns 6 and 7 in our matrix A. Express the new matrix as A - ZVT,…
A:
Q: Why is encapsulation called Data Hiding?
A: Introduction Data encapsulation, otherwise called data hiding, is the system by which the execution…
Q: ArgumentException is an existing class that derives from Exception; you use it when one or more of a…
A: using System;using static System.Console; class SwimmingWaterTemperature { static void Main() {…
Q: During linear increase, TCP computes an increment to the congestion window as: Increment = MSS X…
A: In a linear increase, TCP registers an increment to the congestion window as follows:Increment =…
Q: What is the Computer's Compressed Version of POPC?
A: The question has been answered in step2
Q: What is an IP address? How do mnemonic addresses work? How many domains can a 32 bit representation…
A: Ans:) An IP address is a unique number that identifies a device uniquely on the internet or local…
Q: Name at least three tasks performed by the WinMain (startup) procedure.
A: WinMain() : - WinMain() is the "traditional start point for windows programs". WinMain() is…
Q: 23. Write a C program that reads three floating values and check if it is possible to make a…
A: Here is the c program of above problem. See below steps.
Q: Speed (0 - 120 Km/hr) - Membership functions (Min, Medium, Max) climate (0 - 60*C) - Membership…
A: The answer is written in step 2
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images
- Code uses C++ language If the user chooses to generate a Pentagono This is a combination of a triangular shape and a square shape -- a symmetrictriangle sits on top of a rectangle.o The triangular shape must be symmetric about the vertical axis. There must beexactly one character in the first line, and the number of characters increases by2 in every successive lineo The rectangle shape must have LENGTH lines of height and all lines are 13characters wide.o Make sure to add delay to view a progressively growing pentagon, otherwise youwill just see the final shape. Code for triangle: for (int i = 1; i <= length; i++) { sleep (1); for (int j = length - i; j > 0; j--) cout << " "; for (int b = 1; b <= i; b++) cout << char(rdm) << " "; cout << endl; } Code for square: for (int row = 1; row <=…in c++ Write a program to generate a random number between 1 - 100, and then display which quartile the number falls in. First quartile is 1 - 25 Second quartile is 26 - 50 Third quartile is 51 - 75 Fourth quartile is 76 - 100 To generate a random number, follow these steps: include necessary header files #include <cstdlib> //for random functions #include <ctime> //for time functions set constants for the minimum and maximum values of the desired range const int MIN_VALUE = 1; //minimum range value const int MAX_VALUE = 100; //maximum range value seed the random number generator (RNG) with a unique unsigned int value - system time! unsigned seed = time(0); //system time in seconds since 1/1/1970 srand(seed); //seed the RNG get a random number in the desired range int num = (rand() % (MAX_VALUE - MIN_VALUE + 1)) + MIN_VALUE; The program should: contain header comments as shown in class display a "hello" message (more descriptive than shown in sample)…C++ programming Chapter(s) Covered: Chapter 1-8 Concepts tested by the program: Working with one dimensional parallel arrays Use of functions Use of loops and conditional statements Project Description The Lo Shu Magic Square is a grid with 3 rows and 3 columnsshown below. The Lo Shu Magic Square has the following properties: The grid contains the numbers 1 – 9 exactly. Each number 1 – 9must not be used more than once. So, if you were to add up thenumbers used, The sum of each row, each column and each diagonal all add upto the same number, Write a program that simulates a magic square using 3 onedimensional parallel arrays of integer type. Each one the arrays corresponds to a row of the magicsquare. The program asks the user to enter the values of the magicsquare row by row and informs the user if the grid is a magicsquare or not. See the sample outputs for more clarification. Project Specifications Input for this project: Values of the grid (row by row) Output for this…
- C++ Visual 2019 A particular talent competition has five judges, each of whom awards a score between 0 and 10 to each performer. Fractional scores, such as 8.3, are allowed. A performer's final score is determined by dropping the highest and lowest score received, then averaging the three remaining scores. Write a program that uses this method to calculate a contestant's score. It should include the following functions: void getJudgeData() should ask the user for a judge's score, store it in a reference parameter variable, and validate it. This function should be called by main once for each of the five judges. void calcScore() should calculate and display the average of the three scores that remain after dropping the highest and lowest scores the performer received. This function should be called just once by main and should be passed the five scores. The last two functions, described below, should be called by calcScore, which uses the returned information to determine which of the…c++ Write a function that will generate a random number between 1 and 100. Then it ask the user to guess a number between 1 and 100. If the user’s entry is equal to the random number, it will display “You are a winner”; otherwise, it will display: “You did not win”C++ Code: This function will print out the information that has been previously read (using the function readData) in a format that aligns an individual's STR counts along a column. For example, the output for the above input will be: name Alice Bob Charlie ---------------------------------------- AGAT 5 3 6 AATG 2 7 1 TATC 8 4 5 This output uses text manipulators to left-align each name and counts within 10 characters. The row of dashes is set to 40 characters. /** * Computes the longest consecutive occurrences of several STRs in a DNA sequence * * @param sequence a DNA sequence of an individual * @param nameSTRs the STRs (eg. AGAT, AATG, TATC) * @returns the count of the longest consecutive occurrences of each STR in nameSTRs **/ vector<int> getSTRcounts(string& sequence, vector<string>& nameSTRs) For example, if the sequence is AACCCTGCGCGCGCGCGATCTATCTATCTATCTATCCAGCATTAGCTAGCATCAAGATAGATAGATGAATTTCGAAATGAATGAATGAATGAATGAATGAATG and the vector namesSTRs is…
- 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:Rest of code in image / This is a bad programming style since it is using goto. // This is an spagetti code and not working.// Use function to display menu, and display game rules,// Use different color for text display.// fix it so it works any way you like./*HANDLE screen = GetStdHandle(STD_OUTPUT_HANDLE); // Write 16 lines in 16 different colors. for (int color = 0; color < 16; color++) { SetConsoleTextAttribute (screen, color); cout << " Hello World!" << endl; Sleep(400); // Pause between lines to watch them appear } // Restore the normal text color) SetConsoleTextAttribute(screen, 7);*/#include <iostream>#include <windows.h>using namespace std;int main(){ //textbackground(WHITE); //textcolor(RED); system("cls"); char ch, a[20], ch2; int num = 100, rnum, guess, count, ch1, c = 0; cout << "**********************************************************"<<endl; cout << "*…In C programming language: Write a function that takes 3 int arguments and returns the largest of the 3.
- Lowest Score Drop Write a program that calculates the average of a group of test scores, where the lowest score in the group is dropped. It should use the following functions: void getScore() should ask the user for a test score, store it in a reference parameter variable, and validate it. This function should be called by main once for each of the five scores to be entered. void calcAverage() should calculate and display the average of the four highest scores. This function should be called just once by main and should be passed the five scores. int findLowest() should find and return the lowest of the five scores passed to it. It should be called by calcAverage, which uses the function to determine which of the five scores to drop. Input Validation: Do not accept test scores lower than 0 or higher than 100.Student Registration System is an approach that enables colleges and universities to better supervise a growing number of enrollments. Create a menu system for registration program in c++ that asking an input based on the choices below. If the input is A then the program will ask for name and program (course) store in two arrays, if B then the program will display all the data stored on the array and the program will be terminated only if the input is E. Apply also function on the program: Menu System – 1st Way of Function Add Student – 4th Way of Function Example: REGISTRATION SYSTEM: A - Add Student B - View ALL E - Exit Choose: A Name: John Lloyd Program: CpE REGISTRATION SYSTEM: A - Add Student B - View ALL E - Exit Choose: B Name Program…LISP Function help please LISP Programming only A function that generates a random day of the week, then displays a message saying that "Today is ... and tomorrow will be ...". Then use the built-in function random first to generate a number between 0 and 6 (including). The expression (random) by itself generates a random integer. You can call it with one parameter to return a value within the range from 0 to the value of the parameter-1. For example, (random 10) will return a value between 0 and 9. Next, use the number generated at the previous step to retrieve the symbol for the day of the week from the list. Use the built-in elt. Extract the symbol-name of the day first, then apply the built-in function capitalize to it. Use the result in the princ function call, and do the same thing for the next day. Make the function return true (t) instead of the last thing it evaluates, to avoid seeing the message printed more than once.