Create seven projects, JCF array list, JCF linked list, JCF sort, JCF stack,

Create seven projects, JCF array listJCF linked listJCF sortJCF stack,

STL doubly linked list, STL stack and queue, and STL vector, using the programs in:

  • JCF array list
  • JCF linked list
  • JCF sort
  • JCF stack
  • STL doubly linked list
  • STL stack and queue
  • STL vector

Compile the projects, run them, and review the code that is given carefully. These programs test the code discussed in our lecture.

Exercise 2: Using the JCF ArrayList

Write a Java program to store 1,000 random numbers, each in the interval [0, 500], in a java.util.ArrayList object. Print the numbers.

Exercise 3: Using the STL Vector

Write a C++ program to store the first 20 factorials: 1!, 2!, 3!, . . . , 20! in a vector object.

Exercise 4: Developing an Application with JCF

Complete Project 2 at the end of Chapter 5 in our textbook: Write a Java program that uses a stack to test whether an input string is a palindrome. To implement the solution to this problem, use the stack data structure in JCF.

Note that this exercise is a variation of Exercise 3 in the lab of Week 3.

Exercise 5: Developing an Application with C++ STL

Complete Project 4 at the end of Chapter 10 in our textbook: Simulate a small airport with one runway. Airplanes waiting to take off join a queue on the ground. Planes waiting to land join a queue in the air. Only one plane can use the runway at any given time. All planes in the air must land before any plane can take off. To implement the solution to this problem, use the queue data structure in C++ STL.

Note that this exercise is a variation of Exercise 6 in the lab of Week 3.

 JCF_array_list.zip – Preview not available
 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

Exercise 2: Search Algorithms and Techniques Expand the project developed in the previous exercise to

Exercise 2: Search Algorithms and Techniques

Expand the project developed in the previous exercise to

perform the following experiment: Time the sequential search and the binary search methods several times each for randomly generated values, and record the results in a table. Do not time individual searches, but groups of them. For example, time 100 searches together or 1,000 searches together. Compare the running times of these two search methods that are obtained during the experiment.

Regarding the efficiency of both search methods, what conclusion can be reached from this experiment? Both the table and your conclusions should be included in a separate Word document.

Exercise 3: Searching Applications

The following problem is a variation of Project 4 in the “Projects” section of Chapter 18 in our textbook:

Consider an array data of n numerical values in sorted order and a list of two numerical target values. Your goal is to compute the smallest range of array indices that contains both of the target values. If a target value is smaller than data[0], the range should start with a -1. If a target value is larger than data[n-1], the range should end with n.

For example, given the array

0 1 2 3 4 5 6 7
5 8 10 13 15 20 22 26

the following table illustrates target values and their corresponding ranges:

2, 8  [-1, 1]
9, 14  [1, 4]
12, 21  [2, 6]
14, 30  [3, 8]

Devise and implement an algorithm that solves this problem.

Exercise 4: Hashing

Suppose that the type of key in a hashing application you are implementing is string (Sections 21.7 and 21.8 in our textbook explain hash functions for strings). Design and implement a hash function that converts a key to a hash value. Test your function by computing the hash values for the Java keywords. Was a key collision produced?

 Search_Algorithms.zip – Preview not available
 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

(TCO 2) The circuit that performs the instruction “ADDA” in the HCS12 CPU is (Points : 8)

(TCO 2) The circuit that performs the instruction “ADDA” in the HCS12 CPU is (Points :

8)

 (TCO 3) The HCS12 uses _____. (Points : 8)

(TCO 5) The instruction “subb $100” will (Points : 8)

(TCO 5) For a 16-bit signed number, we can use a maximum of _____ bits for the magnitude of the signed number. (Points : 8)

 (TCO 7) Which statement makes the upper two bits of Port B outputs and the lower six inputs? (Points : 8)

 (TCO 8) The highest single digit in BCD is _____. (Points : 8)

(TCO 8) Find the value for PORTB after the execution of the following code:

PORTB = 0xAA ^ 0x55; (Points : 8)

(TCO 4) Write a program sequence that places the value in Address $2000 into Accumulator A and places the value in Address $2001 into Accumulator B. Then, add these values together and store the result in Location $2002. (Points : 15)

(TCO 7) Write assembly instructions to set Bit 3 of variable foo without changing other bits. (Points : 15)
 (TCO 5) Write the assembly code to specify an array named src that holds values: 01, 23, 45, 67, 89, and an array of five variables named dst, then write the code to copy the values in array src to array dst. (Points : 25)

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

Identify the complete verb in the following sentence. Have you ever been to Florida to see your grandparents?

Identify the complete verb in the following sentence. Have you ever been to Florida to see your

grandparents?

 
Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"