标签:phi within using tput hashtable nes during EDA wing
CISP 430 Data Structures
Midterm Exam
Spring 2020
Directions:
1) This is your midterm examination; upon Canvas submission,
a) you certify sole authorship of the work submitted, and
b) you have provided citation for any published work (text,
Internet, etc.) referenced in research used to complete
this exam.
2) You are solely responsible for ensuring your exam responses
are not copied – do not discuss your ideas or approach with
anyone. If there is any duplication, real or superficial, of
design or source code documents, your entire exam will receive
a grade of zero.
3) The exam must be submitted to Canvas on or before April 22,
6:30pm.
Question 1 - 20 pts: Define the following terms AND show an example
of the object language syntax required to
implement each term.
Data Structure
Abstract Class
Generic Class
Inheritance
Polymorphism
Question 2 - 25 pts: Assume a hastable ADT will implement
a “bucket” as a linked list of slots.
a-5) Show a class diagram for the hashtable design.
b-10) Show the code which implements the default and copy
constructors for two(2)different classes within your
design.
c-10) Assume a user issues the following “message” during
reuse of your design within a user application:
myHashTable.insert(“someData”);
Show the actual code which implements the insert()
method of your design.
Question 3 - 35 pts: Consider the List-Stack-Queue class
hierarchy used in Assignment 2.
a-5) Show the class diagram which defines the List,
Stack, and Queue classes.
b-10) Show the actual code which implements the Insert(),
Enqueue(), and Push() methods of the design.
c-20) Design a “test stub” application which generates the
report below using 1) a stack AND 2) a queue instance.
IMPLEMENT your design in code and submit the design,
code, and report similar to a CISP 430 project
submission. Your solution MUST utilize a stack AND
queue.
Input your test string ===> ABCDEF[enter]
Your output string: FEDCBA
Question 4 - 20 pts: y = 10/5.00 *((sin(PI/6)-cos(PI/3))- a
a-5) Show the postfix equivalent of the infix expression.
b-5) Show contents of Q1 and S2 data structures when token
“6” is processed by the parser.
c-5) Show the contents of the “Eval” stack when the infix
term “sin(PI/6)” is evaluated.
d-5) Function tan(beta) may be defined as:
sin(beta)/cos(beta) [right triangle]
Show the actual code segment of the evaluator which
evaluates infix expression tokens “tan(Alpha+Beta)”
using sin() and cos() as internal functions.
Thus, any tokens referencing “tan” are evaluated
using sin()/cos() ratio internally. Show the
code of the evaluator which implements this algorithm.
如有需要,请加QQ:99515681 或邮箱:99515681@qq.com 微信:codehelp
标签:phi within using tput hashtable nes during EDA wing
原文地址:https://www.cnblogs.com/xiexal/p/12754839.html