C programWrite the definition of the function nodeCount that returns the number of nodes in the binary tree. Add this function to the class binaryTreeType and create a program to test this function.
18 Apr 2020C programWrite the function singleParent that returns the number of nodes in a binary tree that has only one child. Add this function to the class binaryTreeType and create a program to test this function. (Note: First create a binary search tree.)
18 Apr 2020C programWrite a program that outputs the nodes of a graph in a depth first traversal. (If need more information can be uploaded upon request)
18 Apr 2020Design a “cake” Class, you can decide what data fields it has, you should call the file Cake.java. Then write a program in a separate file that creates a Cakeobject and asks the user to input all the information for the Cake. Output your Cake information to the screen. Submit ...
18 Apr 2020By Java. You can approximate Pi by using following series: pi=4*(1-1/31/5-1/71/9-1/11... -1/2i-11/2i1) Write a program that with will display the pi value for i = 10000, 20000 ... 100,000. Then find out how many terms of this series you need to use before you first get 3.141...
18 Apr 20204. (TCO 3) What is the value of beta after the following code executes if the input is 5? int beta; cin >> beta; switch(beta) case 5: beta = 5; case 1: beta; case 5: beta = 5; break; case 4: beta = 4; a) 16 b) 11 c) 7 d) 20
18 Apr 20201. Add a method public void addInterest(double rate) to the BankAccount class that adds interest at the given rate. For example, after the statements BankAccount momsSavings = new BankAccount(1000); momsSavings.addInterest(10); // 10% interest the balance in momsSavings ...
18 Apr 20203 employees in a company are up for a special pay increase.You are given a file, say Ch3_Ex8Data.text, with the followingdata:Miller Andrew 62789.875Green Sheila 75892.566Sethi Amit74900.506.1each input consists of an employee's last name, first name,current salary, and perce...
18 Apr 20201)One of the basic motivations behind the Minimum Spanning TreeProblem is the goal of designing a spanning network for a set ofnodes with minimum total cost. Herewe explore another type ofobjective: designing a spanning network for which the mostexpensive edge is as cheap as poss...
18 Apr 2020word problems given as a sequence of hypotheses/ premises ending with "Therefore conclusion". Show that each question Q1 - Q3 is a valid argument. Use rules of inference to show steps and reasons in the proof. 1) If I take a bus or subway then I'll be late for my appoin...
18 Apr 2020Design a circuit to implement the following pair of Boolean equations: F = A(C!E DE) !AD G = B(C!E DE) !BC To simplify drawing the schematic, the circuit is to use a hierarchy based on the factoring shown in the equation. Three instances (copies) of a single hierarchical...
18 Apr 2020A student walks in to a class room and sees on the blackboard a diagram of a TG with two states that accepts only the word ^.The student reverse the direction exactlyone edge.Leaving all other edges and all labels and 's and _'s the same.But now the new TG accepts a*.What...
18 Apr 2020write a method called switchThem that accepts two integer arrays as parameters and switches the contents of the arrays. >
18 Apr 2020Write a recursive function that takes as a parameter a nonnegative integer and generates the following pattern of stars. If the nonnegative integer is 4, then thepattern generated is: Also, write a program that prompts the user to enter the number of lines in...
18 Apr 2020Part 1: A pentagonal number is defined as n(3n-1)/2 for n = 1, 2, 3, … and so on. So, the first few numbers are 1, 5, 12, 22, … Write the following method that returns a pentagonal number: public static int getPentagonal Number( int n) The input (n) is the nth pentagonal numbe...
18 Apr 2020Consider the 5-bit generator, G = 10011, what is the value of R if D has the value: 1) 1010101010 2) 1001000101 *(It might mean 7 bit generator but theres a discrepency between the assignment and book)
18 Apr 2020Write and test a MIPS assembly language program to read a text file containing only decimal integers and sort them in descending order. The program should do the following: ¦ Open a text file and read its content into an array of characters. The array should be limited to 10...
17 Apr 2020Write a program that includes two methods named calcAverage()and variance(). The calcAverage() method should calculate andreturn the average of the values storedin an array named testvals.The array should be declared in main() and include the values 89,95, 72, 83, 99, 54, 86, 75,...
17 Apr 2020show how to construct an lcs from thecompleted c table &the original sequences X={x1,x2,.....,xm}&Y={y1,y2,....,yn} in O(mn)time,without using the btable.(give explanation &pseudocode) >
17 Apr 2020I need to be able to traverse through a binary tree using python. I need the traversal to be inorder, non-recursive, and not use parents as part of the algorithm. Iwould likely need to use a queue. Thank you and I will rate LIFESAVER! >
17 Apr 2020Task #1 void Methods 1. Copy the file Geometry.java (code listing 5.1) from www.aw.com/cssupport or as directed by your instructor. This program will compile, but when you run it, itdoesn’t appear to do anything except wait. That is because it is waiting for user input, but the ...
17 Apr 2020If any one could help it would be much appreciatedi needhelp writing a console program thatuses a while loop to perform the followingsteps:Prompt the user to input twointegers: firstNum and secondNum(Hint: Ensure that firstNum is lessthansecondNumOutput all results to a file,plac...
17 Apr 2020create a class named book that contains data fields for the title and number pages . include get() and set () methods for these fields. Then create a subclass namedTextbookwhich contains an additional field that holds a grade level for the Textbook and additional methods to get a...
17 Apr 2020You have been asked to assess the LAN at a popular, but cash-strapped children’s museum. Visitors have complained that the video kiosk exhibits, which obtain theircontent from a server on the local network, are slow to respond and sometimes stall out. Meanwhile, museum staff memb...
17 Apr 2020Chapter 2 problem 24 Derive the simplest sum-of-products expression for the function f(x1, x2, x3, x4) = x1*~x3*~x4 x2*~x3*x4 x1*~x2*~x3. >
17 Apr 2020Directions are to Write an application named GoToFar in which you declare an array of five integers and store five values in the array. Write a try block in which youloop to display each successive element of the array, increasing a subscript by 1 on each pass through the loop. C...
17 Apr 2020Write a C# program to help a local restaurant automate its breakfast billing system. The program should do the following: • Show the customer the different breakfast items offered by the restaurant. This information is stored in a data file. The number of items in the data fil...
17 Apr 2020Write a program that computes percentages for specific category in personal budget. It should ask the user to enter estimated monthly expenditures for: a)Rent Payment b)Food c)Utilities and d) All Other. Program should add the amounts, display the Total and compute and displ...
17 Apr 2020Write a shell script that implements a directory size analyzer. The script file should be called "ds" and should be invocable as ./ds from the command line. In your script you may use common Linux commands: make sure that your script runs fine on any Linux machine. The...
17 Apr 2020Essay Question: Type-1 certification (TOP SECRET) focuses on Development Methodology. How would you address this certification issue with your hypothetical company(make up one for this problem) for your system (for example: operating system) that you are trying to certify at the ...
17 Apr 20201. Two stacks of the same type are the same if they have the same number of elements and their elements at the corresponding positions are the same. Overload therelational operator == for the class stackType that returns true if two stacks of the same type are the same, false oth...
17 Apr 2020Using S-DES, decrypt the string (10100010) usingthe key (0111111101) by hand. Show intermediate results after eachfunction (IP, Fk, SW,Fk, IP-1).Then decode the first 4 bits of the plaintext string to aletterand the second 4 bits to another letter where we encode A through Pin ba...
17 Apr 2020Using a 64K x 8 RAM chip plus a decoder, construct the blockdiagram for a 256K x16RAM.6points6.Obtain the PLAprogramming table for the four Boolean functions:A(X, Y,Z) = åm(3, 6, 7)B(X, Y,Z) = åm(0, 1, 4, 5, 6)C(X, Y,Z) = åm(2, 3, 4)D(X, Y,Z) = åm(2, 3, 4, 7)
17 Apr 2020Use branch-and-bound to solve the following IP problem. This problem must be solved in graphical approach. Max Z = 5X1 2X2 S.T. 3X1 X2 X1 X2 X1 >= 0, X2>=0 X1 and X2 are integer
17 Apr 2020Write a method called printSquare that takes in two integer parameters, a min and a max, and prints the numbers in the range from min to max inclusive in a squarepattern. The square pattern is easier to understand by example than by explanation, so take a look at the sample metho...
17 Apr 2020Using the architecture of a houseor building as a metaphor, draw comparisons with softwarearchitecture. How are the disciplines ofclassical architecture andsoftware architecture similar? How do they differ? >
17 Apr 2020Create an application that lets the user enter the amount that her or she has budgeted for a month. A loop should then use the input boxes to prompt the user for hisor her expenses for the month, and keep a running total. When the loop finishes, the program should display the amo...
17 Apr 2020A school has 100 lockers and 100 students. All lockers are closed on the first day of school. As the students enter, the first student, denoted S0, opens every locker.Then the second student, S1, begins with the second locker, denoted L1, and closes every other locker. The third ...
17 Apr 2020Use a one-dimensional array to solve the following problem: Read in 10 characters, each of which is between capital characters A and Z, inclusive. As each character is read, validate it and store it in the array only if it is not a duplicate of a character already read. After r...
17 Apr 2020What is the Big-O measure for initializing the free list in the array-based linked implementation? For the functions GetNode and FreeNode? >
17 Apr 2020not sure exactly on how many files to make any help on suggestions would be great or guides public interface Colorable { public void howToColor (); }//Interface Colorable end public class GeometricObject { public GeometricObject () { }//Cconstructor end } //class Geo...
17 Apr 2020Write a program thatestimates the temperature in a freezer (in C*) given the elapsedtime (hours) since a powerfailure. Assume this temperature (T) isgiven byT = 4t^/t2-20where t is thetime since the power failureYour program should prompt the usertoenterhow long it has been since...
17 Apr 2020Write a program that inputs a time from the console.The time should be in the format "HH:MM AM" or "HH:MM PM".Hours may be one or two digits, forexample, "1:10 AM" or "11:30 PM".Your program should include a function that takes a string parameter containing the time.This function...
17 Apr 2020Give the state of the disjoint-sets data structure after the following sequence of operations, starting from singleton sets{1},....,{8}. use the path compression, incase of ties, always make the lower numbered root point to the higher numbered one. union(1,2),union(3,4),union (5,...
17 Apr 2020Consider a logical address space of 32 pages with 1024 words perpage, mapped onto a physical memory of 16 frames. a. How many bits are required in the logical address? b. how many bits are required in the physical address?
17 Apr 2020DESIGN AND IMPLEMENT THE CLASS DAY THAT IMPLEMENTS THE DAY OF THE WEEN IN A PROGRAM. THE CLASS DAY SHOULD STORE THE DAY,SUCH AS sun FOR sunday. tHE PROGRAM SHOULDbeable to perform the following operations on an object of type day a.set the day b.print the day c.return the day ...
17 Apr 202012) Marcy's Department store is having a BoGoHo (Buy One, Get One Half Off) sale. The store manager wants a program that allows the salesclerk to enter the prices oftwo items. The program should both calculate and display the total amount the customer owes. The half off shoul...
17 Apr 2020Consider the problem of counting, in a given text, the number of substrings that start with an A and end with a B. (For example, there are four such substrings inCABAAXBYA.) a. Design a brute-force algorithm for this problem and determine its efficiency class. b. Design a m...
17 Apr 2020Write a program that computes the roots of a quadratic equation ax2 bx c = 0, which are givenby the following formulas:x1 = (-bsqrt(b^2-4ac))/2ax2 = (-b-sqrt(b^2-4ac))/2aThese formulas cannot be used if the value of a = 0, or if the value b^2 - 4acroots if they exist; otherwise...
17 Apr 2020A parachutist of mass 70 kg jumps from a plane at an altitude of 32 km above the surface of the Earth. Unfortunately, the parachute fails to open. (In the followingparts, neglect horizontal motion and assume that the initial velocity is zero.) (a) Calculate the time of fall (acc...
17 Apr 2020
Welcome to MyCourseHelp Services, World's leading Academic solutions provider with Millions of Happy Students.