– SHOULD STRICTLY FOLLOW THE INSTRUCTIONS.
– NEED PLAGIARISM REPORT ALONG WITH WORK. *****
sample , Article and instruction are attached below.
– SHOULD STRICTLY FOLLOW THE INSTRUCTIONS.
– NEED PLAGIARISM REPORT ALONG WITH WORK. *****
sample , Article and instruction are attached below.
Introduction
CPSC 131
Project 4 Requirements
Representing and Evaluating Arithmetic Expressions
We typically write arithmetic expressions with the operator placed in between its two operands.
For example, “2 + 3”; here, + is the operator and its two operands are 2 and 3. This notation is called Infix notation. The main disadvantage of infix notation is that the order of operations sometimes needs to be made clear with matching sets of parentheses. For example, “2 + 3 x 5” is different from “(2 + 3) x 5.” Therefore, computers represent arithmetic expressions using different notations where the order of operations is unambiguous without using additional symbols like parentheses.
In this project, you will implement two such representations, the Reverse Polish Notation and
Expression Trees and convert between representations.
Expression Trees
( Refer to Example 7.9 in page 285 of the textbook.) An arithmetic expression can be represented with a binary tree. For example, an expression of 3+5 can be represented by a binary tree shown below.
Similarly, an expression of (3+5)*4 can be represented by
A binary tree of an arithmetic expression can be constructed if we know its Reverse Polish notation (RPN).
Reverse Polish Notation (RPN)
RPN (also called postfix notation) is a mathematical notation in which every operator follows all of its operands. For example, the expression 3+5 can be rewritten as “3 5 +” and (3+5)*4 can be
rewritten as “3 5 + 4 *”. Visit https://en.wikipedia.org/wiki/Reverse_Polish_notation for more
information about Reverse Polish notation.
Converting between representations
Converting from Expression Tree to RPN
Note that the postOrder traversal of an arithmetic binary tree gives the exact same expression as its Reverse Polish notation.
Converting from RPN to Expression Tree
Here, we use an example of “3 5 + 4*” to explain how to use RPN notation to construct a binary tree. First, create a stack that will contain nodes of a binary tree we are trying to build. Then, we parse the notation from left to right by steps:
‘3’ is an operand.
Create a node with it and push the node to stack (stack contains one node).
‘5’ is an operand.
Create a node with it and push the node to stack (stack contains two nodes).
‘+’ is an operator.
Create a node with it, connect its left child and right child pointer with two nodes pop out of
stack, and then push this node to stack (stack contains one node).
For every operator you parse in the expression, two operand nodes need to pop out of stack
since RPN requires that every operator follows all of its two operands.
’4’ is an operand
Create a node with it and push the node to stack (stack contains two nodes).
‘*’, is an operator.
Create a node with it, connect its left child and right child pointer with two nodes pop out of
stack, and then push this node to stack (stack contains one node)
Continue if there are more characters in expression.
The whole process can be simplified as a sequence of operations shown below.
push(3)
push(5)
push((pop()+pop())
push(4)
push (pop() *pop())
At the end, there will be only one node in stack that is the root of this arithmetic binary tree.
Converting from Expression Tree to Infix Notation
An inorder traversal of an arithmetic binary tree where an open parentheses is output before
calling a left child and a close parentheses is output after returning from a right child gives a fully parenthesized infix expression. For example, the expression tree shown earlier results in “((3 + 5) *
4)”. Refer to Algorithm printExpression in page 303 of the textbook.
Converting from Infix Notation to RPN
Description of algorithm from 3.9.2. General Infix-to-Postfix Conversion, Problem Solving with
Algorithms and Data Structures using Python ;
http://interactivepython.org/runestone/static/pythonds/BasicDS/InfixPrefixandPostfixExpressio
ns.html
Assume the infix expression is a string of tokens delimited by spaces. The operator tokens are *, /, +,
and -, along with the left and right parentheses, ( and ). The operand tokens are integers. The
following steps will produce a string of tokens in postfix order.
1. Create an empty stack called opstack for keeping operators. Create an empty list for output.
2. Convert the input infix string to a list of tokens – operators, operands, or parentheses.
3. Scan the token list from left to right.
If the token is an operand, add it to the end of the output list.
If the token is a left parenthesis, push it on the opstack.
If the token is a right parenthesis, pop the opstack until the corresponding left
parenthesis is removed. Add each operator to the end of the output list.
If the token is an operator, *, /, +, or -, push it on the opstack. However, first remove
any operators already on the opstack that have higher or equal precedence and add
them to the output list.
4. When the input expression has been completely processed, check the opstack. Any
operators still on the stack can be removed and added to the end of the output list.
Evaluating expressions
Evaluating an expression is computing its final answer. It is much easier to evaluate expressions
represented in RPN or as Expression Trees than in infix notation.
Evaluating expression trees
The postorder traversal of an expression tree can be used to solve the evaluation problem. Refer to Evaluating an Arithmetic Expression in page 298 of the textbook for the algorithm.
Evaluating RPN expressions
A single stack is sufficient to evaluate an RPN expression.
Description of algorithm from 3.9.2. General Infix-to-Postfix Conversion, Problem Solving with
Algorithms and Data Structures using Python ;
http://interactivepython.org/runestone/static/pythonds/BasicDS/InfixPrefixandPostfixExpressio
ns.html
Assume the postfix expression is a string of tokens delimited by spaces. The operators are *, /, +,
and -. The operands are assumed to be integers. The output will be an integer result (assuming
divison returns only the integer quotient).
1. Create an empty stack called operandStack.
2. Scan the token list from left to right.
If the token is an operand, convert it from a string to an integer and push the value
onto the operandStack.
If the token is an operator, *, /, +, or -, it will need two operands. Pop the
operandStack twice. The first pop is the second operand and the second pop is the
first operand. Perform the arithmetic operation. Push the result back on the
operandStack.
3. When the input expression has been completely processed, the result is on the stack. Pop
the operandStack and return the value.
Objective
You are to write a C++ program that will ask the user to enter an arithmetic expression in either infix or RPN. Your program should then return the expression in other notations (infix, RPN, and expression trees) and evaluate the expression into an integer. To do these, you will have to implement the algorithms
described above.
You are given the declarations of functions which will be called from main() to convert and evaluate expressions. Your are also given a class ArithNode which is to be used for nodes of a binary expression tree.
You are to write the definitions of only the functions, adding other functions as needed. Your code is tested in the provided main.cpp .
Simplifying assumptions
There are only four binary operators: + – * /. The division operator returns the integer quotient.
Operands are positive integers.
There will be a space between every token – operators, operands, and parentheses.
There is no need for error checking (i.e., operators and operands will be as described above;
parentheses will be matched).
The infix and RPN expressions will be input/output as strings. Expression trees will be
represented as a pointer to the root node (* ArithNode ). The leaves of the expression trees
(operands) should have null left and right child pointers (not empty “external” nodes).
You are given the code to “print” an expression tree in main.cpp. You just need to construct the tree.
● There are multiple ways to implement some of the functions. For example, to evaluate an infix
expression, you can convert to RPN and evaluate the RPN expression, or convert to an expression tree and evaluate the tree. You only need to implement one method (your choice).
● Note that since each function is a stand-alone function, they are not made part of a class.
● You will need to use other data structures, especially a stack. It is recommended that you use the C++ Standard Library containers (std::stack).
Source Code Files
The starter C++ code has multiple files:
● ExpressionConverter.h : This contains the declarations of the functions to be
implemented. This also contains the class ArithNode. This file is already complete and you
should not change this code.
● ExpressionConverter.cpp : This is to be completed with definitions of the functions
which will be called from main(). You can add other functions as needed.
● main.cpp : Code that brings everything together into one application. The main function also
tests the output of your functions. This is already complete and you should not change this code.
● A README.md file. You must edit this file to include the name and CSUF email address of each student in your group as in other projects.
Obtaining and submitting code
We will again be using GitHub Classroom to distribute starter code. The assignment link is:
https://classroom.github.com/g/8r6pk2xh
When you choose a team name make sure it begins with your section number (1, 2, 3, 4,
5, 6, or 8). Example: 2-myteamname
Draw a level 0 data flow diagram (DFD) for the health club system in Exercise G, Chapter 4.
Important: Use Visio to create the DFD.
Note: This paper will be used and stored as part of the SafeAssign™ services in accordance with the University.
Exercise G. health club system
———————————
Create a set of use cases for the following health club membership system: When members join the
health club, they pay a fee for a certain length of time. Most memberships are for one year, but memberships as short as two months are available. Throughout the year, the health club offers a variety of discounts on its regular membership prices (e.g.,two memberships for the price of one for Valentine’s Day). It is common for members to pay different amounts for the same length of membership.
The club wants to mail out reminder letters to members asking them to renew their memberships one month before their memberships expire. Some members have become angry when asked to renew at a much higher rate than their original membership contract, so that the club wants to track the price paid so that the manager can override the regular prices with special prices when members are asked to renew. The system must track these new prices so that renewals can be processed accurately. One of the problems in the health club industry is the high turnover rate of members. While some members remain active for many years, about half of the members do not renew their memberships. This is a major problem because the health club spends a lot in advertising to attract each new member. The manager wants the system to track each time a member comes into the club. The system will then identify the heavy users and generate a report so that the manager can ask them to renew their memberships early, perhaps offering them a reduced rate for early renewal. Likewise, the system should identify members who have not visited the club in more than a month so that the manager can call them and attempt to reinterest them in the club.
Keep in mind the following questions as you search the literature and if possible try to address as many of them as you can in your report, based on information on your sources:
Do they represent a problem or an opportunity?
A company’s strategic priorities must drive how capital allocations are made and the size of each unit’s operating budget. Using the NEC Danforth’s library resources search for recent (most recent five years) articles that discusses how a company has revised its pattern of resource allocation and divisional budgets to support new strategic initiatives. How do the revisions fit within the context of the material we have covered in our coursework (Thompson text and other material) from this week? Submission Details:
References:
This week’s journal articles focus on empowering leadership and effective collaboration in geographically dispersed teams, please answer the following questions:
Please be sure that journal articles are peer-reviewed and are published within the last five years.The paper should meet the following requirements:
Article: (2016). Empowering Leadership and Effective Collaboration in Geographically Dispersed Teams. Personnel Psychology, 69(1), 159–198. https://doi.org/10.1111/peps.12108
Discussion :
Create a discussion thread (with your name) and answer the following question:
Discussion (Chapter 4): What are the privacy issues with data mining? Do you think they are substantiated?
Note: The first post should be made by Wednesday 11:59 p.m., EST. I am looking for active engagement in the discussion. Please engage early and often.
Your response should be 250-300 words. Respond to two postings provided by your classmates.
There must be at least one APA formatted reference (and APA in-text citation) to support the thoughts in the post. Do not use direct quotes, rather rephrase the author’s words and continue to use in-text citations.
Please check attachment page 194 for chapter 4.
Question and Answers:
1.Define data mining. Why are there many names and definitions for data mining?
2. What are the main reasons for the recent popularity of data mining?
3. Discuss what an organization should consider before making a decision to purchase data mining software.
4. Distinguish data mining from other analytical tools and techniques.
5. Discuss the main data mining methods. What are the fundamental differences among them?
Exercise Question:
Visit teradatauniversitynetwork.com. Identify case
studies and white papers about data mining. Describe
recent developments in the field of data mining and
predictive modeling.
Attached
You have tasked the IT department with developing an incident response plan to address risks to the information system.
Based on your research for Unit 5:
Explain some of the key elements of an incident response plan.
Identify some incidents that should be included in the PCS plan.
Discuss the relationship between this plan and other related planning such as disaster recovery and business continuity.
Create a 10- to 12-slide media-rich presentation including detailed speaker notes about a variety of security threats and security measures and hacking countermeasures to combat the threat.
In your presentation, you should: