Question

Array Vs Symbol Table Comparison Code

A) What is the key difference between an array and a symbol table?

B)

Assume you have a bunch of objects containing information about different SER classes and need to store their data somewhere.

C)

Show the insertion of the elements below into an ordered symbol table structured as a list. Assume the data structure orders

D)

Using the symbol table you created above, execute the Ordered Symbol Table operations listed below. For a, b, c, and e, give

0 0
Add a comment Improve this question Transcribed image text
Answer #1

A.) The key difference between an array and symbol tables is mapping. A symbol table has a key value pair but in the array there is only one field.

34 бб 2 AAameer Va Vaishali YtYttria Ra Ram 8 Array Symbol Table

B.) In this case I would choose a symbol table. It is because, I would store the data associated to a particular key as a value in the symbol table. So, all the keys and the data will be mapped. And whenever we need a particular data, we can just iterate through the keys and get the required output. In an array, we could either store the key or the data. and even if we create 2 arrays, there would be no mapping between them and would increase the complexity. So, i woukld choose symbol table in this case.

C.)Key Value List Contents 1 [K 1] 2 E121 KI1 4 S 41 Y 3] [E 2] [K]1] |[L19] [018] [B17] [MI6] [y|5] [Sl4] [ |[TI10] [ 19] [ 3]

Add a comment
Know the answer?
Add Answer to:
Array Vs Symbol Table Comparison Code A) B) C) D) What is the key difference between...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Need this in C The starter code is long, if you know how to do it...

    Need this in C The starter code is long, if you know how to do it in other way please do. Do the best you can please. Here's the starter code: // ----------------------------------------------------------------------- // monsterdb.c // ----------------------------------------------------------------------- #include #include #include // ----------------------------------------------------------------------- // Some defines #define NAME_MAX 64 #define BUFFER_MAX 256 // ----------------------------------------------------------------------- // Structs typedef struct { char name[NAME_MAX]; int hp; int attackPower; int armor; } Character; typedef struct { int size; Character *list; } CharacterContainer; // ----------------------------------------------------------------------- //...

  • please answer correctly and follow the code structure given [JavaFX/ Exception handing and text I/O] 1....

    please answer correctly and follow the code structure given [JavaFX/ Exception handing and text I/O] 1. Write a program for the following. NOTE that some of these steps are not dependent on each other. Using methods is mandatory. Make sure to use methods where it makes sense. a. Ask the user for a series of integers entered from the keyboard. Use a sentinel value such as 999 to end the input process. If the entered values are not integers, throw...

  • Lab 6 Instructions Objectives: • Executing and experimenting with programs that handle array related topics such...

    Lab 6 Instructions Objectives: • Executing and experimenting with programs that handle array related topics such as declaration, initialization, storing, retrieving, and processing elements. • Effectively manipulating and using ArrayList objects. • Becoming familiar with the use of arrays as method arguments and how array elements are passed to and returned from the called method. • Mastering the use of various debugging tools available on the Eclipse IDU. Important: EVERY one of the following Activities MUST be in a separate...

  • C Thank You for You x Home - OwNet x B Assignment 401 X CPP-A01 -...

    C Thank You for You x Home - OwNet x B Assignment 401 X CPP-A01 - Dynam x ASM-103 - Intege X ASM-A03 - Integex Calculus - Find voll x D (10) Disc method X + -ox + → C onedrive.live.com/view.aspx?resid-322690C11EFFEB37!1631&ithint-file%2cdocxêauthkey-!AOJByR3MAP202A Word Sign in OneDrive CPP-A01 - Dynamic Multiplication Table Accessibility Mode Download Save to OneDrive Print ... When completing this assignment, the student should demonstrate mastery of the following concepts: • Visual Studio Project Creation • C++ Formatted Output...

  • Question 1 An array is NOT: A - Made up of different data types. B - Subscripted by integers. C -...

    Question 1 An array is NOT: A - Made up of different data types. B - Subscripted by integers. C - A consecutive group of memory chunks. D - None of the choices. Question 2 How many times is the body of the loop executed? int i=1; while(true) { cout << i; if(++i==5) break; } A - Forever B - 4 C - 5 D - 6 E - 0 Question 3 What is wrong with the following piece of...

  • C++ Programming Assignment S Mammal Lab This lab's goal is to give you some practice using inheritance, virtual functions, pointers, dynamic memory allocation, random numbers, and polym...

    C++ Programming Assignment S Mammal Lab This lab's goal is to give you some practice using inheritance, virtual functions, pointers, dynamic memory allocation, random numbers, and polymorphism. To complete the lab implement the following steps: Create a class called Mammal. All mammals have a weight and a name, so its data should be the mammal's weight and name. Provide a default constructor that sets the mammal's weight to 0 and name to null, and another constructor that allows the weight...

  • Need help with 1: b, c, d, e and f. And 2. Thanks! PRE-LAB EXERCISES average...

    Need help with 1: b, c, d, e and f. And 2. Thanks! PRE-LAB EXERCISES average size. If d is the diameter in millimeters, some pebbles will be bigger and some smaller than the desired average do. Suppose you have a rock crusher. The pebbles it makes have different sizes, but you can adjust the 1. (a) In the histogram below, about how many pebbles are shown to have diameter of greater 150 100 (b) In this distribution (same histogram,)...

  • ChangeRequest(CRID, CRType, CRTitle, CROriginDate, CRPriority, CRNeedEvent, CRStatus) NeedByEvent(Event) CRPrevState(CRID, CRState, StartDate, EndDate) CRAssigned(CRID, EmpID, StartDate, EndDate)...

    ChangeRequest(CRID, CRType, CRTitle, CROriginDate, CRPriority, CRNeedEvent, CRStatus) NeedByEvent(Event) CRPrevState(CRID, CRState, StartDate, EndDate) CRAssigned(CRID, EmpID, StartDate, EndDate) Employees(EmpID, FirstName, LastName, JobTitle) ChangeRequest(CRID, CRType, CRTitle, CROriginDate, CRPriority, CRNeedEvent, CRStatus) The CRID is the primary key, it is unique, and it is an positive integer The CRType may be one of two values: "Deficiency" or "Enhancement" CRTitle is a variable length string that may be up to 2048 characters CROriginDate is a date CRPriority is an integer that may assume a value of...

  • database and sql problme THE QUESTIONS 3, 4,5 and 6 REFER TO THE RELATIONAL TABLES LISTED...

    database and sql problme THE QUESTIONS 3, 4,5 and 6 REFER TO THE RELATIONAL TABLES LISTED BELOW CREATE TABLE Department ( DECIMAL(5) VARCHAR(30) CHAR(5) DATE NOT NULL NOT NULL NOT NULL * Department number /*Department name * Department manager number */ /Manager start date DNumber DName Manager MSDate CONSTRAINT Department_PK PRIMARY KEY(DNumber) CONSTRAINT Department_CK UNIQUE(DName) CREATE TABLE DeptLocation DECIMAL(5) VARCHAR(50) NOT NULL NOT NULL DNumber * Department number */ * Department location */ Address CONSTRAINT DeptLocation_PK PRIMARY KEY(DNumber, Address) CONSTRAINT...

  • Additional code needed: PartA: BurgerOrder class (1 point) Objective: Create a new class that represents an...

    Additional code needed: PartA: BurgerOrder class (1 point) Objective: Create a new class that represents an order at a fast-food burger joint. This class will be used in Part B, when we work with a list of orders. As vou work through this part and Part B, draw a UML diagram of each class in using the UML drawing tool 1) Create a new Lab5TestProject project in Netbeans, right-click on the lab5testproject package and select New>Java Class 2) Call your...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT