Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Bookmark Maker

In this assignment, let's build a Bookmark Maker by applying the concepts we learned till now.


Celsius (centigrade) temperature C can be converted to an equivalent fahrenheit temperature F according to the following formula: F = (9/5)C + 32

how SAP’s Ariba suite of solutions can aid CQ in managing their relationship with the overseas suppliers.


Veterinarian maintains a record book to store details about the pets who undergo treatments. Each pet gets a unique 3 digit identification number. A log is maintained to store the identification number and the pet name. Assume we are inserting the following records to the log

Insert 128 Julie

Insert 338 Cookie

Insert 568 Snowy

Insert 189 Kaluwa

Insert 789 Jimmy

Insert 121  

Insert 445 Shaggy

Insert 556 Roxy

i)How does Open Addressing differ from Separate Chaining?

ii)If the collisions are resolved by Separate Chaining, draw the hash table. The values would be inserted according to the given order.

iii)Repeat Part ii where collisions are resolved by Linear probing.  

iv)Repeat Part ii where collisions are resolved by Quadric probing. 

v)Repeat Part ii where collisions are resolved by Double Hashing. Assume the constant value is 5.

Hint: Step number constant — (key % constant)



a) The stack class has been created as follows:

class Stack { 

int maxSize; 

double stackÄrray[ ] 

int top;

i) Write the constructer method to initiate Stack class properties.  

ii) Write the pop() method to remove a value from the Stack.

public double pop ( )

b) Assume S is stack developed using a linked list. 

Show the final contents of the Stack after executing the following code.

for (int k=1; k<=7;k++)

   s. push (k) ; 

for (int k=1; k<=7;k++)   

s . push (s.pop ( ) ) ;

c) The Queue class has been created as follows, to store integer values.

class Queue {

LinkedList queueList; 

int n Items;


i)Write the constructor to initiate the Queue class properties.

ii)Write a method to insert a value to the Queue.

public void insert (int i)

iii)Write a method to delete a value from a Queue.

public Link delete()

iv)What is the major limitation of Linear queues?



You have been contracted by client to develop a program using c++. The Program must have the
following specifications.
The program must:
a. Allow the user to enter the full name of the university - “Ghana Communication Technology
University”.
b. Print the entire name for the university.
c. Count the number of ‘e’ in “Ghana Communication Technology University” and display.
d. Print the last 21 characters in “Ghana Communication Technology University”.
e. Replace the string “Ghana” in “Ghana Communication Technology University” with “Accra”
and print the new name.
You should submit a script file and a plain text output file (.txt) that contains the test output. Multiple file uploads are permitted.

Your submission will be assessed using the following Aspects.

Does the submission include a my_sqrt function that takes a single argument and includes the while loop from the instructions?
Does the my_sqrt function initialize x and return its final value?
Does the test_sqrt function print a values from 1 to 25?
Does the test_sqrt function print the values returned by my_sqrt for each value of a?
Does the test_sqrt function print correct values from math.sqrt for each value of a?
Does the test_sqrt function print the absolute value of the differences between my_sqrt and math.sqrt for each value of a?
Does the my_sqrt function compute values that are almost identical to math.sqrt ("diff" less than 1e-14)?
Part 2

Write a function named test_sqrt that prints a table like the following using a while loop, where "diff" is the absolute value of the difference between my_sqrt(a) and math.sqrt(a).

a = 1 | my_sqrt(a) = 1 | math.sqrt(a) = 1.0 | diff = 0.0
a = 2 | my_sqrt(a) = 1.41421356237 | math.sqrt(a) = 1.41421356237 | diff = 2.22044604925e-16
a = 3 | my_sqrt(a) = 1.73205080757 | math.sqrt(a) = 1.73205080757 | diff = 0.0
a = 4 | my_sqrt(a) = 2.0 | math.sqrt(a) = 2.0 | diff = 0.0
a = 5 | my_sqrt(a) = 2.2360679775 | math.sqrt(a) = 2.2360679775 | diff = 0.0
a = 6 | my_sqrt(a) = 2.44948974278 | math.sqrt(a) = 2.44948974278 | diff = 0.0
a = 7 | my_sqrt(a) = 2.64575131106 | math.sqrt(a) = 2.64575131106 | diff = 0.0
a = 8 | my_sqrt(a) = 2.82842712475 | math.sqrt(a) = 2.82842712475 | diff = 4.4408920985e-16
a = 9 | my_sqrt(a) = 3.0 | math.sqrt(a) = 3.0 | diff = 0.0

Modify your program so that it outputs lines for a values from 1 to 25 instead of just 1 to 9.
CS 1101 Programming Fundamentals - AY2022-T1
Dashboard
My courses
CS 1101 - AY2022-T1
30 September - 6 October
Learning Guide Unit 5

Learning Guide Unit 5
Learning Guide Unit 5

Programming Assignment
This assignment is based on Exercise 7.1 from your textbook.

Part 1

Encapsulate the following Python code from Section 7.5 in a function named my_sqrt that takes a as a parameter, chooses a starting value for x, and returns an estimate of the square root of a.

while True:
y = (x + a/x) / 2.0
if y == x:
break
x = y

Which of the language listed below is not a High-level programming language?

Select one:

a.

MASM

b.

C#

c.

Python

d.

Ruby


LATEST TUTORIALS
APPROVED BY CLIENTS