C/C++

Search for question

Questions & Answers

Purpose of the Project The goal of this exercise is to develop a simulator for a stack-based microprocessor. The Details You are to develop a simulator for the abm abstract machine. Your simulator must support all instructions included in the abm-instruction-set.doc document. You may refer to the abm program files demo.abm, factProc.abm, foo.abm, operatorsTest.abm, and recursiveFactorial.abm to help you to understand both the syntax and the semantics of the abm machine. You are to use the Linux operating system. You may choose any programming language for coding your solution. Your simulator must be able to execute any possible program written in the abm machine language


Requirements: This assignment has two tasks where two programs have to be modified: Task 1: complete all of the uncompleted functions in Tree.c Task2: complete all of the uncompleted functions in FlightDb.c


Task2: complete all of the uncompleted functions in FlightDb.c


In this assignment, you will create a few functions for manipulating strings. While these functions are operations that are genuinely useful in some contexts, the real purpose of this assignment is to give you some practice using dynamic memory, starting with something simple (copying a string to the heap) and moving up to something a little fancier (joining several strings with a separator string).


1 Project Overview This is a modification to your first Chapter 13 project. Instead of a pointers, you will store your objects within smart pointers (unique) and then move them into another vector showing you understand how unique smart pointers work.. A file that contains the inventory of all animals in a zoo is used to keep track of this information by the zoo managers. This file is a comma separated values (CSV) file and needs to be read using the stringstream class (as discussed in class). They have hired you to write a report which shows the total cost of supporting the animals at the zoo on a monthly and a yearly basis. Your job is to write a program which reads this file and prints out a well for- matted report to help the staff better understand where their money is going. You will do this with an animal class and an vector of Animal class unique smart pointers. Make ABSOLUTELY sure that you spell everything exactly as it is shown in this assignment. I will be testing your class with my own main() function as well as yours, so everything must be exactly as shown.


Exercise 2 Write a program that performs the following input/output operations: Part 1 - Personal details: Part II - Employment details Part III -Summary


4. In algebra, the values x, or roots, of an (quadratic) equation of the form ax² + bx + c = 0, where a, b and care real numbers, are calculated using the quadratic formula, namely x = (-b ± (b²-4ac))/2a. If the discriminant of this formula, namely b²-4ac, is zero, then there is 1 root. If the discriminant is positive, then there are 2 roots. If the discriminant is negative, then there are 2 complex or imaginary roots. Using C++ code, write a program to print "1 root", "2 roots" or "2 complex roots" if the discriminant is zero, positive or negative, respectively, where a, b and care input by a user via the keyboard.


2. Draw a memory diagram of the variables of the following code after the execution of the code. int M, N; M = N = 4; while (M > 0) { N = M* 2; M--; }


1.4 Create pseudocode and a flowchart for a modular program CSC105 Graded Project 1 READING ASSIGNMENT Your project must be submitted as a zipped/compressed (*.zip) file that includes the following files: • Text file (*.txt) of your pseudocode • Screenshot(s) in JPEG format (*.jpg) of your flowchart • A Rich Text Format (*.rtf) or Microsoft Word (.doc) file that lists the following information: o Your name o Your student ID number o The exam number o Your email address


Exercise: You will write a program to simulate the routing decision taken at a router that we discussed in the lectures. You are given a text file (Routing Table.txt) containing a routing table for a router (the five column generic routing table with mask, destination address, next hop, flag and interface). You will notice that this is almost the same routing table as the one that we discussed in the lectures. The first few lines of the text file are shown below.


No Question Found forC C

we will make sure available to you as soon as possible.