Make a program fro Stack ising java which should evaluate the algebraic expresions.
Q: Write Java class Message that automatically gives each created Message object a unique serial number...
A: Static keyword in Java is also used to handle memory. The variables, processes, blocks and nesting g...
Q: Write a C++ program that declare arrays a and b and use initializer list to initialize the arrays wi...
A: #include <iostream> using namespace std; int main() { //Use initializer list to initialize...
Q: C++: Consider the following code: struct node { int data; node *next; }; node myNode; node *p = &am...
A: D) myNode.data = 7; will set the member variable- data of myNode to the value 7.
Q: Which of the following practices promote maintainable software? (choose all that apply) a) Design an...
A: Which of the following practices promote maintainable software
Q: Who was the creator of the C++ language? Name at least one interesting thing about this person
A: Creator of the C++ language is: Bjarne Stroustrup C++ is a middle-level programming language used fo...
Q: Please answer
A:
Q: which of these are valid mySQL statements? A. TRUNCATEB. INSERT INTOC. UPDATED. SELECT
A: All of the given statements, that is, INSERT INTO, UPDATE, and SELECT are valid MySQL statements. Th...
Q: In mysql, the same primary key can be used multiple times on the same table True or false?
A: The answer for this question is false. In a table , one primary key is available per table, but the...
Q: Create a program to read input for the user a sequence of parenthesis input, {}[]() and check whethe...
A: Introduction of the Program: STL(Standard template library) is a library in C++ and stack follows th...
Q: PYTHON CODE. KEEP OUTPUT SAME. Implement the following:1) Define a function sumValues() with an arbi...
A: Source code in Python: #function definition def sumValues(x): #initialising sum with 0 sum=0 ...
Q: Hello, I attatched the criteria that must be followed and the project instructions. PLEASE MAKE TH...
A: python program
Q: Please explain what is exactly inside the picture
A: A flowchart is shown in it which explains the flow of a program that is its logic. 1) The program st...
Q: nthesis. In the answer box arr[] = {1,9,7,8}; * intPtr = arr; :« &intPtr « endl; E« (arr[0] + 1) « e...
A: Since *intPtr is pointer variable that holds arr address of start index 0 &intPtr means address ...
Q: Please help
A: The correct answer of this given question is "can miss legitimate risk".
Q: Network Plant Server Which of the following Windows Server 2016 is used to install the operating sys...
A: The correct answer of this given question is "Windows Server Update Services".
Q: The population (p) of a small community on the outskirts of a city grows rapidly over a 20- year per...
A: According to the question, The fit of the exponential model can be developed with the following scri...
Q: Exercise 3: Write a program that reads from an input file “scores.txt” student test scores inthe ran...
A: Objective: Need to write a program to read students' scores from a file and store the data to a list...
Q: Write the program to take input for a number if the number is palindrome,then display it's half on t...
A: Palindrome is a number that is equal to its reverse 1221 = reve(1221) =1221 #include <iostream&...
Q: Need complete and simple project with source code in c++ language on atm machine With complete ex...
A: we are creating a simple project for atm machine which contain following functions - 1) view bala...
Q: Consider the table and four functional dependencies below. Which of these dependencies hold on the t...
A: The correct Answer of this given question is (option:3)"A,D,E->B,C"
Q: What permission would you deny to group and other so they cannot execute or source a script?
A: A group can execute a source or script by using read, write, and edit operations but we can manipula...
Q: You would use a stream's clear method to: Multiple answers: Multiple answers are accepted...
A: The correct answer of this question is (option:e) " forget an end-of-file encounter before seeking b...
Q: Please answer all questions
A: Note: please post only one question in one post. we are allowed to solve only one according to the p...
Q: what is the algorithm? Write a program that prompts the user to enter a number with the range of 1...
A: An algorithm is a set of instructions designed to perform a specific task. ALGORITHM: step1: take in...
Q: Using C++ language, create a program to read input for the user a sequence of parenthesis input, {}[...
A: Stack is a linear and dynamic data structure which follows the FIFO(First In Last Out)or LIFO(Last I...
Q: please answer
A: UPnP is known as universal plug and play. it networked devices to discover each other on the network...
Q: we have two strings X = BACDB and Y = BDCB to find the longest common subsequence, then C[4][3] is *...
A: Introduction: The LCS (longest common subsequence) algorithm is used to obtain the sequence with a m...
Q: Hello, I attatched the criteria that must be followed and the project instructions. PLEASE MAKE TH...
A: Python is an interpreted, high-level and general-purpose programming language. Python's design philo...
Q: Please answer both questions
A: These settings are configured in firewall settings. Answer: firewall Settings
Q: python question Implement the following:1) Store the following data into a tuple, colors: red, green...
A: colors=("red","green"); shapes=["rectangle","circle"]; #if there is no spacingprint("colors: "+str(t...
Q: What is a "foreach" loop?
A: A for-each style loop is designed to cycle through a collection of objects, such as an array, in a s...
Q: Write a function longest_streak(string, char) that receives as parameters a strings and a character ...
A: If same character is found start comparing all the latter values till new character is arrived Compa...
Q: Let R and S be the following relations: R S А В С 3 1 2 13 2 2 3 1 А C D 13 2 1 2 3 2 3 1 3 2 1 Give...
A: 1. It is a Natural Join of the two tables. It joins two tables based on the common columns and shows...
Q: True/False: a member function in a class can access all of its class's member variables, but not if ...
A: Option B: False
Q: When compared to a compiled program like Java, the PHP scripts we ran on the server were? A. fasterB...
A: The correct "all of the adove" Option "D" Explanation PHP is a scripting language that was developed...
Q: please do a,b,and c tasks and a cv means curucullum vitai write name address education contacts work...
A: a). For this part please provide the appropriate data. b). mul $t6, $t0, $t1 #this adds...
Q: Subject is computer orgnization and architecture
A: ISA: ISA is the portion of the machine which is visible to either the assembly language programmer ...
Q: List 3 potential virtualization problems
A: Solution: Virtualization virtualization can be defined as process of creating a virtual version ...
Q: Assume the Book class is defined as follows: public class Book{ enum Type type {FICTION,NON_FICTI...
A: The Book class is defined as follows: public class Book{ enum Type type {FICTION,NON_FICTION}; p...
Q: Give examples showing how "super" and "this" are useful with inheritance in Java. Include examples o...
A: class A { int i; A(int a) { this.i = a; }}class B extends A { int i; B(int a, int b) { super(a);...
Q: Given the following grammarE → E + EE → E – EE → idShow that string id + id – id, generates two pars...
A: Right-most derivations E E + E id + E - E id + id -id Left-most derivations E E + E E + id E - E + ...
Q: 2. Draw the timing diagram for the Clocked SR flip-flop at each of the instants t0 to t6 as describe...
A: Clocked SR flip-flop: Clocked SR flipflop built from AND-gates in front of a basic SR flipflop with...
Q: Using Python
A: Encryption is the technique of converting plaintext or a normal message into decrypted message (Ciph...
Q: python
A: choice = int(input("Enter your choice (1-4): ")) if choice == 1: cm = float(input("Enter a value ...
Q: Calculate the checksum fo 1100111110110101 1111101011110010
A: CHECK SUM CHECK SUM is nothing but checking the sum. Checksum = Check + sum Conditions Operation a...
Course: Data Structure and
Language: Java
Please solve problem completely according to requirement, program should must be follow all the rules of menu base system which are required and write in question:
Attach the output's screentshots and explain every line with comments:
Whole code should be user defined inputs not same like exmple:
Task 2: (Stacks):
Make a program fro Stack ising java which should evaluate the algebraic expresions.
Evaluation of Algebraic Expression:
Your program will take an infix algebraic expression as an input from user. It will check that whether it is a valid expression or not. Then It will be converted into postfix
expression, and at the end it will be evaluated and print the result of the expression.
For example:
if input is: (3+5)*(7
output: it is invalid.
If input is: (3+5)*7 , display
Postfix form: 35+7*
Answer: 56
Step by step
Solved in 2 steps
- Course: Data Structure and Algorithms: Language: Java Please solve problem completely according to requirement, program should must be follow all the rules of menu base system which are required and write in question: Attach the output's screentshots and explain every line with comments: Whole code should be user defined inputs not same like exmple: Task : (Stacks): Make a program for Stack using java which should evaluate the algebraic expresions.Evaluation of Algebraic Expression: Your program will take an infix algebraic expression as an input from user. It will check that whether it is a valid expression or not. Then It will be converted into postfixexpression, and at the end it will be evaluated and print the result of the expression.For example:if input is: (3+5)*(7 output: it is invalid. If input is: (3+5)*7 , displayPostfix form: 35+7*Answer: 56Java Programming Hello! Can you make an algorithm / code for this part for my java calculator application. (see attached photo) All basic operations are already working, only the M's are needed to be implemented. Contains 'M+', 'M-', 'MC', 'MR' buttons(used to temporarily store data) with the corresponding stack functionalities as follows: 'M+' is push 'M-' is pop 'MC' is clear stack 'MR' is peakJava ProgramI will give an upvote to one that can help me. Instructions:- Create a java program using the concept of PDA (Push Down Automata) - This program will check if the input is a palindrome or a balanced symols. - It must use a stack way- Make it simple as possible Take note: You can copy from google but modify it to satisfy the needs of the student. Thank you so much!
- Java Files Recursive.java RecursiveDemo.java The purpose of the assignment is to practice writing methods that are recursive. We will write four methods each is worth 15 points. a- int sum_sqr_rec(stack<int> stk) which will receive a stack of "int" and output the sum of the squares of the elements in the stack. b- int plus_minus_rec(stack<int> stk) which will receive a stack of "int" (example: {a,b,c,d,e,f,g,h,i,j}) and output the sum of the elements in the stack as follows: a - b + c - d + e - f + g - h + i -j c- void prt_chars_rev_rec(stack<char> stk) which will receive a stack of "char" and print its elements in reverse. d- void prt_chars_rec(queue<char> stk) which will receive a queue of "char" and print its elements Remember to use the stack and queue STL. The Assignment will require you to create 2 files: Recursive.java which contains the details of creating the 4 methods as specified above: int sum_sqr_rec(stack<int> stk), (15 points)…7. Dynamic MathStack The MathStack class shown in this chapter has only two member functions: add and sub. Write the following additional member functions: Function Description mult Pops the top two values off the stack, multiplies them, and pushes their product onto the stack. div Pops the top two values off the stack, divides the second value by the first, and pushes the quotient onto the stack. addAll Pops all values off the stack, adds them, and pushes their sum onto the stack. multA11 Pops all values off the stack, multiplies them, and pushes their prod- uct onto the stack. Demonstrate the class with a driver program. here is the extention file please use it. // Specification file for the IntStack class #ifndef INTSTACK_H #define INTSTACK_H class IntStack { private: int *stackArray; // Pointer to the stack array int stackSize; // The stack size int top; // Indicates the top of the stack public: // Constructor IntStack(int); // Copy constructor…Must be new solution and run on GNU Common Lisp! Using Lisp, write a program that solves the Missionaries and Cannibals problem that uses a DFS( depth first search). It should use (mac start end). Start is the current state (which can be (3 3 l) and End is the goal state (which can be (0 0 r). This should output the sequences of moves needed to reach the end state from the start state. This should print nil if there is no solution. For example, the call should be something like this! Call: (mac '(3 3 l) '(0 0 r)) Output: ((3 3 l) (2 2 r) (3 2 l) (3 0 r) (3 1 l) (1 1 r) (2 2 l) (0 2 r) (0 3 l) (0 1 r) (1 1 l) (0 0 r))
- Data Structure and algorithms ( in Java ) Please solve it urgent basis: Make a programe in Java and attach the image of output screen: Question 4: Write a programe which has function name RemoveDuplicates() which takes a list sorted in increasing order and delete any duplicate nodes from the list. Ideally, the list should only be traversed once.please help me ? Homework : by C# language * if we think of compilers, they check weather the parentheses in the expression we wrote are the same * for example : 2 * ( i+5 * ( 7- j / ( 4 * k )) has a lack of parentheses. " ) " * write the program that checks if the number of parentheses in the expression is equal, using the stack ROUGH CODE OF THE ASSIGNMENT * chek the brackets using stack: 1.Create an empty stack and start reading the symbols 2.If the symbol is the start symbol ( '(', '[', '{' ) put in the stack 3.If the symbol is the closing symbol ( ')', ']', '}' ) I) Return error report if stack is empty II) If not : Receive from stack Send error if received symbol is not the same as start symbol 4. If the statement is over and the stack is full, return an error.Use Python for this question. Also please comment what each line of code means for this question as well: Inheritance (based on 8.38) You MUST use inheritance for this problem. A stack is a sequence container type that, like a queue, supports very restrictive access methods: all insertions and removals are from one end of the stack, typically referred to as the top of the stack. A stack is often referred to as a last-in first-out (LIFO) container because the last item inserted is the first removed. Implement a Stack class using Note that this means you may be able to inherit some of the methods below. Which ones? (Try not writing those and see if it works!) Constructor/_init__ - Can construct either an empty stack, or initialized with a list of items, the first item is at the bottom, the last is at the top. push() – take an item as input and push it on the top of the stack pop() – remove and return the item at the top of the stack isEmpty() – returns True if the stack is empty,…
- Design and implement an application that reads a sentence fromthe user and prints the sentence with the characters of each wordbackwards. Use a stack to reverse the characters of each word.8. Pop the infix expression off the stack and print it.Write the report of this course that is the explanation of the algorithm in this program #include<iostream> // include necessary libraries #include<stack> // include necessary libraries #include<locale> // include necessary libraries #include <climits> // include necessary libraries using namespace std; int preced(char ch) { // defining precedence function if(ch == '+' || ch == '-') { // if condition return 1;}else if(ch == '*' || ch == '/') {return 2;}else {return 0;}} string inToPost(string infix ) { // defining push function stack<char> stk;stk.push('#'); string postfix = ""; string::iterator it; for(it = infix.begin(); it!=infix.end(); it++) { // for loop if(isalnum(char(*it))) // if condition postfix += *it;else if(*it == '(') // if condition stk.push('(');else if(*it == ')') { // if condition while(stk.top() != '#' && stk.top() != '(') {postfix += stk.top(); stk.pop(); // pop element }stk.pop(); }else {if(preced(*it) >…Output tracing. Give the exact output of the program. Give the exact output of the program. (ps. I don't have laptop to run this code and it is hard to use cellphone to run this..) import java.util.Stack; public class Main { public static void main (String [ ] args) { Stack cardSymbol = new Stack; cardSymbol.push("club"); cardSymbol.push("spade"); cardSymbol.push("heart"); cardSymbol.push("diamond"); System.out.println("Stack: " + cardSymbol); System.out.println("Size of Stack: "+ cardSymbol.size()); System.out.println("Is Stack empty? " + cardSymbol.isEmpty); int pos = cardSymbol.search ("flower"); if(pos != -1) { System.out.println("Found the element 'flower' at position: " + pos); } else { System.out.println("Flower not found, it was taken by someone!"); } } }