Modify the program you wrote for Exercise 3 and include a new variable to repre- sent the additional number of telephones to be connected to an existing network, and initialize this variable to 10. For this program, two outputs are required: the number of direct lines for 100 telephones and the additional number of lines needed when 10 telephones are added to the existing network.
Q: Write a programming statement that uses postfix mode to increment a variable named count.
A: Programming statement If the operator appears in the expression after the operands, then the expre...
Q: Question 3 What is the entropy of your name (first name+ last name) Name: William Mark
A: As per the question, First name = "WILLIAM" whereas, Surname = "MARK" The number of characters in n...
Q: Under what circumstances should you use a for loop rather than a foreach loop to process data stored...
A: Advantages of “for” loop over “foreach” loop: The below are the circumstances that “for” loop should...
Q: --Creating the tablesUSE Bobs_Home_Repair; DROP TABLE IF EXISTS dbo.BOB_EMPLOYEE; CREATE TABLE dbo.B...
A: Database : It is collection of data which can be managed,accessed and maintained easily. Data Schema...
Q: Write the INCLUDE directive that is required when using the Irvine32 library.
A: The directive is - Irvine32.inc.
Q: . (True/False): The EIP register cannot be the destination operand of a MOV instruction.
A: EIP register EIP register holds the Extension Instruction Pointer register. It is used to tell the ...
Q: Describe how to use conditional operators.
A: Conditional operators The conditional operator is used to evaluate whether its first operand is tru...
Q: Explain the function of the ASSUME directive
A: Function of ASSUME directive: The ASSUME directive is used to direct the assembler on how to calcul...
Q: The split method in the String class returns anarray of strings consisting of the substrings split b...
A: To solve this problem, We shall first convert the given string and delimiter to a character array....
Q: 2. Run a query that reports back the average of each exam in the same query.
A: The following query will return the average of each exam- exam1, exam2 and exam3 in the same query: ...
Q: Write a function that receives an integer. The function must return a string containing thebinary re...
A: Purpose of the program: We need to provide a function having an integer and returns a string contain...
Q: Use a language C++
A: Answer 1: The objective of the program is to construct a binary search tree and show the information...
Q: what is Binding ?
A: Binding Binding is defined as an association between two things such as an association of an entity...
Q: 1. There are 12 general categories of threat to an organization's people, information, and system...
A: Threats are negative influence which negatively affects the productivity of an organization as well ...
Q: When you start a new Visual C# project, what is automatically created and displayed in the Designer?
A: Start of new visual C# project: When a new project gets started in visual C# project, visual studi...
Q: What is the Meaning of CAPSLOCK_ON?
A: The CAPSLOCK_ON means the light of the CAPS LOCK is on.
Q: Describe the output produced by this poorly indented program segment: int number = 4;double alpha = ...
A: Program structure Declare the integer variable "number" and initialize it to 4. Declare the double ...
Q: Run a query or multiple queries if needed to report on final exam average based on thestudent’s age....
A: Display Average FinalExamGrade for age < 40: Select avg(FinalExamGrade) From StudentsDataCurrentC...
Q: Declare an array of 120 uninitialized unsigned doubleword values.
A: Statement to declare an array of 120 uninitialized unsigned doubleword values: arr DWORD 120 DUP (...
Q: Write a C++ Code: Summary The following formula gives the distance between two points, (x₁,y₁) and (...
A: The following functions are needed to create the program with given description: distance()- It is...
Q: Write a parameterized constructor for a base class named Movie with a string field named _title and ...
A: Parameterized constructor: If the constructor of the class accepts arguments into its parameter list...
Q: Briefly explain recursion
A: The recursion is the technique used in the programming in which the function calls to do looping but...
Q: What is stored in list after the following C++ code executes? int list[8];list[0] = 1;list[1] = 2; f...
A: In your code, you have put 1 and 2 values at 0th and 1st index of list respectively. After that you ...
Q: What is a GUI?
A: It is the Graphical User Interface (GUI), a type of user interface in which users can have the picto...
Q: Here is the what im writing: The error starts at the second line. Im using Spyder/anaconda to write ...
A: You need to write python function. Function name should be "getBonus". This function will accept 2 p...
Q: 5) The results are categorise as Merit, Pass or Fail. Explain how you will determine whether a stude...
A: Let us consider the Students who qualified Subject wise and even scored Total Marks 120 or more than...
Q: What’s the basic difference between the ROLLUP and CUBE extensions of the GROUP BY clause?
A: The GROUP BY clause is used to group aggregate function outcomes according to a given column. The GR...
Q: Write a c++ program to subtract many numbers from the user using an array
A: The user is prompted to enter the size of the array. An array of data type double is used to declare...
Q: Write a C++ program that contains the following function: [1] A function to Multiply two [M]*[N] mat...
A: A00 A01 A02 A10 A11 A12 A20 A21 A22 B00 B01 B02 B10 B11 B...
Q: Describe how to avoid bugs by avoiding patches.
A: A software vulnerability refers to an entry-point or weakness of a software tool or operating system...
Q: When the value of an item is dependent on other data and that item is not updated when the other dat...
A: Answer is given below,
Q: What is the process of matching a method call with the correct method called?
A: Matching a method call with the correct method: Method overloading means that a class contains mul...
Q: Explain the difference between an interrupt handler and a memory-resident program.
A: In computer interrupt handlers or interrupt service handler or ISRs are used to handle interrupts. I...
Q: What is meant by the naming convention used by a language?
A: Naming convention A naming convention is used for naming things. It is a set of rules that is used ...
Q: A(n) __________ occurs when a loop iterates one time too many or one time too few. a. general error ...
A: Off-by-one error: Off-by-one error is a logical error which involves in the discrete equivalent of ...
Q: Which of the following headers indicates that the procedure returns a Decimal number?a. Private Func...
A: Header to indicate a procedure returning a decimal number A procedure is a set of coded instructio...
Q: Please solve this in python 3.8.3
A: Purpose of the program: This program would create a class including the following functionalities as...
Q: For each of the following isolation levels, give an example of a schedule that respects the specifie...
A: Transactions are carried out simultaneously in a serializable system, but the effect must be the sam...
Q: Writing the code to perform a task once and then reusing it each time you need to perform the task i...
A: Code reuse: Code reuse is defined as a process where the code is written once and used many times. ...
Q: Define Declaring and Initializing Variables.
A: Variable declaration and initializing variable: Variable is a part of program. One can declare the ...
Q: Declare a local variable named myByte that holds an 8-bit signed integer.
A: Answer is given below,
Q: Can Boolean methods be used to modularize input validation? Why or why not?
A: “Yes”, Boolean methods can be used to modularize input validation.
Q: Which MS-DOS function terminates a program and leaves part of the program resident in memory?
A: TSR (Terminate and Stay Resident program) TSR program is a program that leaves a part of itself (kn...
Q: True or FalseMachine language is the only language that a CPU understands.
A: Answer: The computer programs are written in programming languages like C, C++, Python, Java, C#, a...
Q: Create a database named Amazon using the attributes.Create individual tables based on below attribut...
A: BUSINESS RULES One customer can have one or more orders. One order belongs to only one customer. O...
Q: Use a language C++
A: BST: In a BST, the data is arranged in such a way that the left-subtree holds the values that must b...
Step by step
Solved in 2 steps with 1 images
- Q3. We want to change the value of the mile, the unit mainly used in the United States, to the value of the kilometer, the international standard unit. Implement the mile2km(mi) function that takes a mile value as a parameter and returns it in kilometers and calls this function to output 1 to 5 miles as kilometers. In this case, use for - in range to make it repeatable. (Define 1 mile as 1.61 km.) 1 mile 1.61 kilometers 2 mile 3.22 kilometers Condition for Execution 3 mile 4.83 kilometers 4 mile 6.44 kilometers 5 mile 8.05 kilometers Time 5 minutes Write the entire code and the expected output results in the note.Hi, I need help with the following assignment. Implement a program that reads in a year and outputs the approximate value of a Ferrari 250 GTO in that year. Use the following table that describes the estimated value of a GTO at different times since 1962. Year Value 1962-1964 $18,500 1965-1968 $6,000 1969-1971 $12,000 1972-1975 $48,000 1976-1980 $200,000 1981-1985 $650,000 1986-2012 $35,000,000 2013-2014 $52,000,000Let's modify the program from this section so that the user can supply the interest rate. For very small interest rates, it may take a very long time for the balance to double. Assume the user can't wait for more than twenty years. Stop adding interest when the balance has doubled or twenty years have elapsed. 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 finaldoubleTARGET=2*INITIAL_BALANCE; doublebalance=INITIAL_BALANCE; intyear=0; Scannerin=newScanner(System.in); System.out.print("Interest rate in percent: "); doublerate=in.nextDouble(); // TODO: Count the years required for the investment to double // but no more than 20 years /* Your code goes here */ System.out.println("Year: "+year); System.out.printf("Balance: %.2f%n", balance); }
- You want to write a program that will generate accurate shipping charges for a local grocery store. The shipping charges for the store are as follows: Weight of Package (in pounds) Rate per mile Shipped 5 Lbs or less $0.20Over 5 Lbs but no more than 8 Lbs $0.35Over 8 Lbs but not more than 16 Lbs $0.45Over 16 Lbs $0.50 Do NOT use global variables for this exercise. Write a function in a program that asks for the weight of a package in pounds and the distance it is to be shipped. These two arguments are to be passed into the funciton by REFERENCE. Using that data, write a second function (called by the main program) that calculates the shipping charge and returns it to the main program and displays the value inside the main program. For the second function, pass the two values (weight and distance) into the function as…Using function calls, write a program to spell out the word MISSISSIPPI using block letters like the following. M M MM MM M M M M M M M M M M M M M IIIIIII I I I I I IIIIIIII SSSSSS S S S SSSSSS S S S SSSSSS and so on.. Java coding Make sure to use static methods so that you main program is easy to read.You can find out how many seconds have elapsed since Jan 1, 1970 using the time() function. #include <time.h> now = time(NULL); // now is more than a billion seconds (which data type should you use?) Write a program that estimates how many years, months, weeks, days, and hours have gone by since Jan 1 1970 by calculations with the number of seconds that have passed. The number of months must be less than 12, i.e., take out how many years have gone by first, then how many months are left, then weeks, etc. Assume that all years have 365 days, and all months have 30.42 days. Don’t use a calculator, or any web site that reports the number of seconds in a month, etc. – your C program can calculate anything that you need. Notice that this is an assignment on using arithmetic in C. Hints. How many seconds are in a minute? hour? A day? A week? A month? A year?
- Write a function called Strange with two parameters A and B, where B has the default value of 100. The value returned from the function is A-B if A is bigger than B, but returns B-A otherwise. (Note that there will be no print statements in this function, and you will be penalized if you use them.)write this function with only the def and return statements, but no other lines of code. Do not use: value1 if condition else value2You are contracted by Citywide Taxi Company (CTC) to develop a taxi dispatcher system in C++. In this system, the operator receives a taxi request (you can write the code to ask if there is a request for the taxi), randomly dispatch a taxi (out of six taxis) to pick up the passenger(s). The taxi dispatched will determine how many passages it picked up and add this piece of information in the dispatch system (initially, the number of passengers for each taxi was zero at the beginning of the shift). When there is no more service needed, the dispatch will display the total number of passengers the entire company served and by each taxi during that shift. (You cannot use global variables) You will declare six objects of Taxi with information included; There has to be one static variable (in Taxi) to accumulate the number of passengers served by each taxi dispatched; A taxi is randomly selected when the request is received; The number of passengers is randomly decided by a function in…You are contracted by Citywide Taxi Company (CTC) to develop a taxi dispatcher system in C++. In this system, the operator receives a taxi request (you can write the code to ask if there is a request for the taxi), randomly dispatch a taxi (out of six taxis) to pick up the passenger(s). The taxi dispatched will determine how many passages it picked up and add this piece of information in the dispatch system (initially, the number of passengers for each taxi was zero at the beginning of the shift). When there is no more service needed, the dispatch will display the total number of passengers the entire company served and by each taxi during that shift. (You cannot use global variables) You will declare six objects of Taxi with information included; There has to be one static variable (in Taxi) to accumulate the number of passengers served by each taxi dispatched; A taxi is randomly selected when the request is received; The number of passengers is randomly decided by a function in…
- Write a function MaxMagnitude() with two integer input parameters that returns the largest magnitude value. Use the function in a program that takes two integer inputs, and outputs the largest magnitude value. Ex: If the inputs are: 5 7 the function returns: 7 Ex: If the inputs are: -8 -2 the function returns: -8 Note: The function does not just return the largest value, which for -8 -2 would be -2. Though not necessary, you may use the absolute-value built-in math function. #include <iostream>using namespace std; void MaxMagnitude(int userVal1, int userVal2) {if (abs(userVal1) > abs(userVal2)) {return userVal1;}else if (abs(userVal2) > abs(userVal1)) {return userVal2;}}/* Define your function here */ int main() { int userVal1;int userVal2;cin >> userVal1 >> userVal2;/* Type your code here. Your code must call the function. */ cout << MaxMagnitude(userVal1, userVal2) << endl;/* Type your code here */ return 0;} Please help me with this problem using…Given a int variable named callsReceived and another int variable named operatorsOnCall, write the necessary code to read values into callsReceived and operatorsOnCall and print out the number of calls received per operator (integer division with truncation will do). HOWEVER: if any value read in is not valid input, just print the message "INVALID". Valid input for operatorsOnCall is any value greater than 0. Valid input for callsReceived is any value greater than or equal to 0.Write a program that does temperature converter :\n", "- The user will enter if he wants the result in Celsius or in Fahrenheit. Use the input function to read this option. \n", "- Ask the user the value of the temperature he wants to convert. Use the input function to read this value and convert accordingly.\n", "- If the user wants the temperature in Fahrenheit compute: $ Fahrenheit = Celsius*5/9+32$.\n", "- If the user wants the Celsius compute as follows: $ C = (F-32)*5/9 $.\n"