Explore BrainMass

Explore BrainMass


    BrainMass Solutions Available for Instant Download

    Test the stack class by determining if the given strings have matching open and closing () and/or {} and/or []. Write the code to test the queue class by determining if the given strings are char-by-char palindromes.

    Please help me in writing the code to test the stack class, and enhancing and testing the queue class. 1. Test the stack class by determining if the following strings have matching open and closing () and/or {} and/or [] : () [](){} [{()}] [[)) {()[()]} The fourth one is the only one that should not have

    C++ Stack, Memory Problem

    I have created my stack template (not using stl). my methods work for the testing file. Even though the program runs correctly, there is a memory problem somewhere in the program and I can't figure out what I have done wrong. I have allocated new memory for my stack and I'm deleting it as well, but still there is a problem so

    Design and implement a class called statistician in C++.

    Design and implement a class called statistician in C++. After a statistician is initialized, it can be given a sequence of double numbers. Each number in the sequence is given to the statistician by activating a member function called next_number. For example, we can declare a statistician called s, and then give it the seq

    Code Blocks C++

    Bonus Problem: Use the three functions above to make a simple card game of your choice. The game should be designed inside of a class called "Game" and you will write a main function that will run the program. Refer to the following link: http://www.pps.k12.or.us/schools/wilson/files/cbartlo/CS34Assignment95.pdf

    Dynamic Arrays C++

    In class, we have been discussing creating objects using the new operator and releasing the memory using the delete operator. Two other similar operators are new[] and delete[]. These operators work the same as the new and delete but with arrays, these are called dynamic arrays: int size = 5; // Dynamic arrays don't h

    C++ Template Linked List Program

    Please refer to attachment as well. The purpose of this assignment is to practice pointers. To this end, we will study a data structure, Linked Lists. When studying arrays, we found some limitations on arrays: * Arrays have fixed size. Once an array is created, the size cannot be changed. * Assuming an array has to be s

    C++ Conditional Statement Based on Time

    I have written a program for multidimensional integration that employs several techniques of integration, varying over different ranges, because one technique will take less time to integrate over a certain region of space than another. I would like to know how to write a conditional statement based on the amount of time th

    Programming: C++ Arrays

    I need this to run in code blocks. Create an array that will display to the console values of 7 test scores. You can enter these test scores from your source. Please enter comments for each line. I was thinking like: English 98 Math 76 History 99 PE 100 Computer Lab 88 Literature 84 Biology 94

    Beginner C++ Class

    The united kingdom uses two official currencies, the British Pound Sterling, and the euro. Currently the exchange rate is 1 USD to 1.5771 GBP, and 1 USD to 1.37653. Write a program that will ask the user what type of currency he has and return a value for that currency.

    Write a small program in C++ to time the given algorithm.

    Write a small program in C++ to time the given algorithm. Algorithm: SUM[n=0 to 100] n(n x 3n)(n+1)/(77n - 4) Hint: you can use a timing function such as: clock_t begin = clock(); ... clock_t end = clock(); See attachment for a better illustration of the math.

    C++ Program for Matrix Operations

    Given the following matrices "A" and "B" (Please see the attachment for the matrices.) Write the C++ program for: - Getting A^T (transpose of A) - A + B - A - B

    C++ Program To Display Words

    Suppose viewers have voted and we have counted the votes. We want to know who the winner is. Write a program that asks for the number of votes each contestant received. Compare these three numbers to determine the result of the contest. There are seven possible outcomes. Your program must determine which of the following is

    Write Card, Deck and Player Classes in C++

    1. Write a class called "Card" with the following traits: it holds two private variables, a suit and a value (ace is high). It has public functions that randomly generate and modify the suit, value and print out the suit/value to the screen. Write a suitable main function to test that it is working properly. 2. Write a cla

    Find values of an array using C++ Algorithm

    Using the following Array, S = { -55.985, 14.75, .00049, 35.42, -.00049, 883.03, 19.03 } use code (the language of your choice) to write a program to do the following Exercises Problem 2 : Write an algorithm that returns the smallest value in the array. Use a for loop Problem 3: Write an algorithm that outpu

    using C designing a simple letter guessing game

    Using only C (not c++) design the program described General Requirements ? Write a program that reads letters from a file called"inputLet.txt". ? Your program will ask the user to enter the number of games they wish to play (1 to 4) ? This program should open an inputLet.txt file , read in one character at a time and repe

    Code Blocks C++

    Write a program that lets the user enter a starting amount of cash in their bank account, an interest rate (in percent) and calculates the value of their account after 30 years (assume interest is credited to the account at the end of every year). Print out the account balance at the end of each year. (using for loops.

    Code Blocks C++ Into an Array

    Intro to Arrays An array is a powerful data structure in C++ that lets us keep track of lists of different types of information. They are quite flexible in that we can put almost anything we want into an array and then access it at a later time. Arrays have two main requirements when we define them: first of all we

    Code Blocks C++ for Pythagorean Theorem

    i want write a program that solves the Pythagorean Theorem. Allow the user to input two of the three sides of a right triangle and the program will output the missing side, but most importantly, I want the program to also output the measures of the unknown angles in the triangle, using asin(), acos(), and atan().

    Programming Using C++

    Please help with the following problem. Write a program that computes and prints the 1000th prime number using code blocks c++. a. You will need some variables to keep track of which prime number you're on and keep track of where you are in your loop. b. Need to test odd numbers to see if they are prime.. c. Need two l

    C++ Console Program that Uses Recursive Function Sum_Squares

    Write a recursive function sum_squares(int N) that computes the sum of squared, positive integers smaller than or equal to N. Write a program that: 1) asks the user to enter an integer Q; 2) creates an array of Q integers; 3) fills all the array with, in position number j, the sum of squared integers up to j, as computed b

    Writing a C++ Program in Command Line

    Please help with the following problem involving programming languages. Write a C++ program that counts the number of non-space characters per line in the specified file. Program should accomplish this via a function that receives a string read from text file and returns the count of the non-space characters in the string to

    C++ Linked List that Counts Unique Entries

    See the attached file. We have a list of numbers and we need to know two things, what numbers we have and how many of each number do we have in the list. So we read in each number and add the number to an ordered linked list. If we are adding a number to the list and we find that number, then we will just count it. If we do

    Using C++

    Graph 1 A B C D E F G A 0 0 1 1 0 1 0 B 0 0 0 1 1 0 0 C 1 0 0 0 0 1 0 D 1 1 0 0 1 1 0 E 0 1 0 1 0 0 0 F 1 0 1 1 0 0 1 G 0 0 0 0 0 1 0 Graph 2 A B C D E F G A 0 0 0 1 0 1 1 B 0 0 0 1 1 0 0 C 0 0 0 0 0 0 0 D 1 1 0 0 1 1 0 E 0 1 0 1 0 0 0 F 1 0 0 1 0 0 1 G 1 0 0 0 0 1 0 (1) Determine if the g

    Binary Tree using an Underlying Linked-List Approach

    Write a C++ program to build a binary tree using an underlying linked-list approach. Include capability to traverse the tree and print out the nodes in a format which makes it readily clear how the tree is organized.