Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Detailed Question: Need a high score for those 4 labs and 1 assignment.

Lab1 Graph - Matrix
due April 3 at 23:59 (before Sunday)

Lab2
Graph - List
due April 10 at 23:59

Lab3 and lab 4
Linked Lists - Link Based Queue
and

Hashing - Hash Table

Assignment Program 4

Requirements : high quality and meets most professor's requirements for high score. The first lab should be done before April 3 . Prf you guys can finish the rest 3 labs and assignment as soon as possible with high quality and sent to me.

All information about 4 labs and 1 assignment included in a (doc,)document

Lab 1
Link Based Queue
Create a node class/struct.
Create a queue class/struct.

Members:
Node - a node that tracks the front of the queue.
Node - a node that tracks the end of the queue.
Count - indicates how many items are on the queue.

Methods:
En-queue
- Accepts a number and adds to the end of the queue.
De-queue
- Returns a number from the front of the queue.
- If the queueis empty, emit an error indicating the queueis empty.
IsEmpty
- Returns a boolean indicating if the queue is empty.

Lab 2
Graph Matrix
Create a matrix based graph representation.
It will need to support the following operations.
Ask the user how many points there are.
Ask the user to label those points, ie "A", "B", "C"...
Define the matrix as a square matrix based on the number of points, also keep an array of the labels.
Repeatedly ask the user to define edges between two points. Add these edges to the matrix.
Have a list method that will list out all of the edges in the graph.

Lab 3
Graph List
Create a list based graph representation.
It will need to support the following operations.
Ask the user how many points there are.
Ask the user to label those points, ie "A", "B", "C"...
Define the graph as an array of linked lists based on the number of points that holds labels. The node type would support the label and weight.
Repeatedly ask the user to define edges between two points with the weight of the edge. Add these edges to the list.
Have a list method that will list out all of the edges in the graph with their weights.

Lab 4
Hash Table
Create a hash table class/struct.
Define an array that holds 27 elements.
Define a function called Hash(int)
-This function returns the modulo of that int by the size of the table (array).
Define an add function that takes an integer.
-This function takes the integer, determines the hash of that number by calling the above hash function, then adds it to the table using linear probing for collision resolution.
Define a function that looks up a value, it takes an integer, return -1 if the value is not in the table.
Create a main that allows the user to add and lookup items in the table.

Lab submit rules
Submission Instructions
For labs, I only need source code to be attached. Click on the title of the lab to go to the submission page. Attach your source file(s) and submit, after submitting please click on your attachment to verify you can see your source code, if you can't neither can I, which means I'll have nothing to grade to give you points. Labs can be resubmitted as often as you want, however due dates still apply.

Assignment

Program Specification:

Build a hash table using chaining as the collision resolution technique. Insertions into the hash table will correspond to declarations of variables and values in a program, searches will be requests for the value of a variable. Some variables will be local and have a narrow scope while some variables will be global.

The program will take input from a file, another program written in the omnipotent programming language BORG (Bionicly Omnipotent Resistance Grinders) and generate output from this program.

The BORG language has the following commands (keywords):

1. START-FINISH blocks. Indicating different scopes.
2. COM - Single line comments: Text should be ignored if on the same line
3. VAR varName - Variable Declaration, adds "varName" to the hash table.
4. variable = expression - Assignment statements, ie GEORGE = 122. Find GEORGE in the hash table and assign 122 to it.
5. ++ - increment operator, syntax: VARIABLE ++
6. -- - decrement operator, syntax: VARIABLE --
7. expressions, expressions are limited to unary and binary arithmetic, or variable names
8. supported operators: + - / * % ^ (plus, minus, divide, multiple, modulo, exponent)
9. PRINT - syntax PRINT expression. If the expression is a variable, and this variable is not in scope, then an error message indicating unknown variable x at line number y. The value printed if there is a variable in scope should be the variable with the closest scope.
10. Errors - other than the print statements, our interpreter will not be responsible for detecting errors, syntax errors should be disregarded if encountered, assume that the source file is correct.

Our hash function: sum the ordinal values of the characters of the variable multiplied by their position in the string (1-indexing), then taking the modulo by TABLESIZE.

ie. The variable ABC = (65 * 1 + 66 * 2 + 67 * 3) % TABLESIZE

All tokens are separated by one space or a new line.

Output: for this assignment, run your interpreter on this sample source program as well as a program of your own, and turn it the output from both, as well as the source code from your BORG program as well as source code of the assignment and its executable. Zip is good.

X-Credit. Each student may implement one additional feature to the language, such as adding if, methods, more capable print statements. Only one student may implement a given extension to the language, and each extension must first be cleared with me.

Input Output

COM HERE IS OUR FIRST BORG PROGRAM

 

COM WHAT A ROBUST LANGUAGE IT IS

 

START

 

   VAR BORAMIR = 25

 

   VAR LEGOLAS = 101

 

   PRINT BORAMIR

BORAMIR IS 25

   BORAMIR ++

 

   PRINT LEGOLAS

LEGOLAS IS 101

   PRINT GANDALF

GANDALF IS UNDEFINED

   PRINT BORAMIR * 2

BOARAMIR * 2 IS 52

   COM

 

   COM NESTED BLOCK

 

   COM

 

   START

 

      VAR GANDALF = 49

 

      PRINT GANDALF

GANDALF IS 49

      PRINT BORAMIR

BORAMIR IS 26

   FINISH

 

   PRINT GANDALF

GANDALF IS UNDEFINED

   START

 

      LEGOLAS = 1000

 

      PRINT LEGOLAS

LEGOLAS IS 1000

   FINISH

 

   PRINT LEGOLAS

LEGOLAS IS 1000

   LEGOLAS --

 

   PRINT LEGOLAS

LEGOLAS IS 999

FINISH

 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91729623
  • Price:- $250

Guranteed 48 Hours Delivery, In Price:- $250

Have any Question?


Related Questions in Computer Engineering

In the scenario activity operating systems and forensics

In the scenario activity Operating Systems and Forensics, which forensic tools would you utilize to recover and process evidence found on the hard drive and what is the objective of recovering data from the USB drive tha ...

Suppose a record has the following fields in this order a

Suppose a record has the following fields in this order: A character string of length 15, an integer of 2 bytes, a SQL date, and a SQL time (no decimal point). How many bytes does the record take if: Fields can start at ...

Question research parallel computing and prepare an

Question : Research parallel computing and prepare an informal paper 2 -3 pages in length, single spaced with a blank line beltween paragraphs. The response must be typed, single spaced, must be in times new roman font ( ...

What are some of the basic principles involved with

What are some of the basic principles involved with utilizing the ADT stack? What are some applications that could effectively utilize a stack?

C programminghelp with a program positivec that include the

***C PROGRAMMING*** Help with a program positive.c that include the following function: void extract(int *a, int n, int *positive, int *size); The function should use pointer arithmetic, not subscripting. The extract fun ...

Question suppose a process in host c has a udp socket with

Question : Suppose a process in Host C has a UDP socket with port number 6789. Suppose both Host A and Host B each send a UDP segment to Host C with destination port number 6789. Will both of these segments be directed t ...

In terms of reducing the total number of memory accesses a

In terms of reducing the total number of memory accesses a program might require. Using the arithmetic expression S = (A+B)-(C+D), support this statement.

Task 1 use the sumofnnumbersjava file create a method that

Task 1: Use the sumOf_N_Numbers.java file. Create a method that takes in two parameters namely the starting and ending number of the range and returns the sum of all the numbers in that range to the calling method Task 2 ...

Question suppose you are given an instance of the

Question : Suppose you are given an instance of the fractional knapsack problem in which all the items have the same weight. Show that you can solve the fractional knapsack problem in this case in O(n) time.

Subject digital securityprovide an fidm authentication

subject : Digital Security Provide an FIdM authentication system that you have used (being subjet to). Tell the name of the organizations acted as the IdP (Identity Provider) and SP (Service Provider)?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As