An example of when passing parameters by value as opposed to passing them by reference is a better. Give a example of when passing parameters by reference as opposed to passing them by value is a better technique.
Assume that v is an array-based tree with 70 members. (a). Is v a leaf node? (b). What is the index of the first leaf node? (c). What is the parent of v? (d). What are the children of v? (e). Does any item have exactly one child? (f). What is the depth of the tree? (g). How many leaf nodes does the t
Analyzing Age and Weight In this project you will combine the use of arrays and objects to perform some analysis of the age and weight relationships among a group of people. You have been contracted to write a program into which data about people, including their ages and weights, will be entered. As output the program will p
Company weekly payroll. The input will be a list of hours worked by employees. The output will be the list of amounts owed to each employee plus a total sum of the amounts owed. Use two methods that work with arrays that contain the payroll data. The first method, which will be called getPayrollData(), will be called from mai
Create an Employee class for a basic payroll program to compute the net pay salary of hourly based employees. Your program should also find the average net pay for a small company. To define the class, include the appropriate data members, member functions, and access modifiers. For simplicity, use a constant tax rate of 30% to
Data structures include: 1. a linked list, 2. an ordered, one-dimensional array, and 3. a binary tree. Suppose the list of letters R, A, N, B, C, F, X and G are stored in a list. Chose which of these three data structures you believe would be the best to alphabetize the list and then add and delete letters from the list while ke
Need C program for problem: Random Walk Simulation A two-dimensional array (N X M) should be used to represent the number of times the bug reached each tile on the floor. All cells of this array should be initialized to zero. The position of the bug on the floor is represented by the coordinates (i-bug, j-bug). The eight
Need some assistance modifying attached code to meet/produce the following requirements/output: Write a program that reads numbers from the keyboard into an array of type int. Assume that there will be 50 or fewer entries in the array. The program should allow any number of numbers to be entered, up to 50 numbers. The outpu
The National Earthquake Information Center has asked you to write a program for the following decision table to characterize an earthquake based on its Richter scale number. Richter scale characterization N<5.0 little or no damage 5.0 ≤ n < 5.5 some damage 5.5 ≤ n < 6.5
The problem below is an example of a problem I'm studying to gain additional knowledge in programming. Please provide explanation along with the Flow chart. ------------------------------------------------------------------ Create a flowchart for this program that would produce a count of the number of residents residing
If you choose to answer problem 1 in Section B, you must complete both parts a and b. a) Write a C program that has a declaration in main() to store the following numbers into an array named channels: 2, 4, 5, 7, 9, 11, 13. There should be a function call to display() that accepts the channels as an argument named channels a
How would you approach a backup and administration plan for the hypothetical situation described below. Include any network administration systems that should be installed for remote access in the event of a network emergency. This is basically a disaster recovery plan. Hypothetical situation: ABC Corporation performs sensit
I'm supposed to write a class Octagon that extends the class Circ and implements Comparable (compare the object's area) and Cloneable interfaces. The octagons sides are all of equal size. The area can be computed according to the formula: area = (2 + 4/sqrt(2)) * side * side. Write a test program that creates an array of sha
Write a Java application using iteration that will print two of the following patterns. Select either #1 & #4 OR #2 & #3 patterns. #1 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 5 6 #2 1 2 3 4 5 6 1 2 3 4 5 1 2 3 4 1 2 3 1 2 1 #3
Develop an Algorithm to implement the following function and describe how the required task can be achieved in a step by step process. a.Insert_in_array (element,position) The parameter element is a data item to be added to the array. The parameter position is the array index at which the new element will be inserted. Make
What complications are imposed if one tries to implement a dynamic list using a traditional homogeneous array?
Suppose that a homogeneous array with 6 rows and 8 columns, is stored in row major order starting at address 20 (base ten). If each entry in the array requires only one memory cell, what is the address of the entry in the third row and fourth column? What if each entry requires two memory cells?
Use a loop and an array to read in 10 integers from the keyboard. Then display them. Then create a flowchart for the above. Please also provide the Pseudocode.
For this assignment, you will create a program that automatically generates numbers between a range provided by the user and stores them in an array. Your program will then calculate the number of page faults using replacement algorithms and provide the average frame replacements for each. STEPS 1. Write a program using C+
Generate a set of test inputs and expected results for the Currency Conversion program. Pseudocode: Input: Arrays of Employee Name and Salary [1..N] Output: MeanSalary, nSalaryAbove, nSalaryBelow Uses: BubbleSort Declaration: Real TotalSalary, MeanSalary Integer nSalaryAbove, nSalaryBelow, Count, i Process Begin
Using c-language programming (not C++): Write a complete program to do the following specification: 1. Pickup 10 numbers and store it in an array using function fillArray. 2. Print the content of array with the message "Array not sorted" using printArray function. 3. Copy array a into array b using copyArray(a,b,10) fun
Examine the BinSearch.java program. Write a Word or text document detailing how the binary search code works. Text document ok. See the attached file.
What would you suppose the most common type of error is when using arrays? Why? How can you guard against it?
Write an interactive Java program that illustrates the use of methods, constructors, loops and arrays. Your Program will do the following: 1. Ask the user for a String input of letters, i.e., Ohio; John Doe; AnyTown. Notice that strings with spaces are allowed. 2. Offer your user two choices: 1. Determine the
I have to write a Java program method named reversal that returns a new array that is a reversal of the original array. Use [5.0, 4.4, 1.9, 2.9, 3.4, 3.5] to test the method. Also, the reversal method is to send the minimum item of the array. Output Sample: Original Array is: 5.0 4.4 1.9 2.9 3.4 3.5 The Reversal is: 3.
Implement two recursive algorithms to solve the following problems: Problem 1: Implement a recursive algorithm to find the maximum element of given integer array A. Count the number of comparisons while finding the maximum element and print input size, maximum element, and number of comparisons. Example: integer array A=[1
Write a program that prompts for the number of rooms in a house. Use the input, n, to declare an array of rectangles dynamically. In a loop, input the dimensions for the n rooms, and then output the total area of the house. Scan the array to identify the room with the largest perimeter, and output its dimensions. Specificatio
A client/server system requires remote users to use a password to log onto the server. Describe a simple scheme that would thwart eavesdroppers from obtaining and/or spoofing the password.
Q1 A client/server system requires remote users to use a password to log onto the server. Describe a simple scheme that would thwart eavesdroppers from obtaining and/or spoofing the password. A1. unknown Q2 Bob is concerned about the possibility of having his 100k byte file modified without his knowledge, so he calculate
Write a program that reads a 5 x 5 two-dimensional array of integers and then prints the row sums and the column sums: Enter row 1: 8 3 9 0 10 Enter row 2: 3 5 17 1 1 Enter row 3: 2 8 6 23 1 Enter row 4: 15 7 3 2 9 Enter row 5: 6 14 2 6 0 Row Totals: Column Totals: You may either initialize this array with
A microcomputer memory is built from 64K X 1 DRAM, with DRAM cell array organized into 256 rows. Each row needs to be refreshed at least once every 4 ms, strictly on a periodic basis. 1. Give time period between successive refresh requests. 2. How long a refresh address counter do we need?