Explore BrainMass


C++ Hash Tables: Book Search Program

Using hashing , we have to have a program that does the following. It will allow a user to search for books using the ISBN, book title, or author search key. The proper implementation would be to store the actual data in a list, and use separate hash tables for each search key. The value associated with each key is not the book

Binary Tree Concept

Use a binary tree (to be used as an ordered tree) to do the following: 1. reads in the United States constitution. (usconst2.txt) 2. given a list of arbitrarily long list of unordered words with an arbitrary number of different values (words0 appearing in it, determine and print the marginal distribution for this list of wor

C++ Big O Notation

What does "n" represent in relation to big O notation? In other words, what does it mean? Like in O(n). I need a definition of what n is in words.

Writing a C++ Program: Student Grades Example

I am having to use a linked list to display student names and grades. I may possibly need a double linked list. I do have a linked list, I just need to implement it to do the student grades. I will post instructions and code.

c++ recursion

Need help finishing a program. It's the hanoi tower recursion program. In addition to what I have, I also need a function that: 1. tells how long my computer takes to move the disk (in seconds) 2. if someone can move 1 disk per second, how long would it take them to move 100 disc? Both functions should be recursive and I'm

Defining a C++ Union

1) Define a C++ union. Explain how a union may be used. 2) How may sharing be associated with unions? 3) What are the alternatives to unions?

Constructor, Object and Accessor Functions in C++

Given below is a c++ class called Sbox used in shipping. We can declare an object of type Sbox to hold the dimensions of a shipping box, a height, width and depth. We define a height (h), width (w) and depth (d) for the three sides of a box. For shipping, it is required the height to be no greater than 45 inches. The width can

Basics of Passing Arguments in C++

Use the program, Passing-by-Value, on Ex5_02 of the text and the program, Passing-by-Reference, on Ex5_07 as a starting point for this assignment. Write a similar program, but change the code to pass two variables to the function call rather than one. Answer the following questions after completing both programs: - W

Dealing with Arrays using For Loop

Using a for loop, print the contents of the array. The output should appear like this: PRINTING CONTENTS OF ARRAY ================================== A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Change the program logic to prompt you for a position within the array that coincides with the letter. See the followi

Creating a C++ Program

Create a complete C++ program that prompts the user to enter his or her height in inches and outputs the following: Output "Height is six feet or more." when the user's height is 6 feet or more. Output "Height is less than five feet." when the user's height is less than 5 feet. Output "Height is at least five feet but l

Trouble Shooting C++ Code

This code prints all elements of the array geo for ( int i = 0; i < geo.length; i++ ) { //the code is missing here } __________________________________________________________________ Where is the error in this code sequence? // a is an ArrayList of strings // a has already been declared and instantiated a.size ( )

Fixing Error on C++ Code of Sequences

What is the output of this code sequence? int [ ] a= {12, 48, 65}; for (int i =0; i < a. Length; i++ System.out.println (a [i] ); Where is the error of this sequence? Integer i 1 = new Integer (10); Integer i 2 = new Integer (15); Double d1 = new double (3, 4); String s = new string ("Hello"); Integer [ ] a

Advanced file operation

Write a program that determines how many consonants are in an entered string of 50 characters or less. Output the entered string and the number of consonants in the string. Write a program that will read records from a file (create your data file by using data from sample below) and store them in a binary file. That file will

C++ Data Structures Overload Operator

We have to use the overload operator operator == to compare to objects and we are to use operator !=. The rest of the program does as I ask it to. I will go ahead and the instructions given to us anyway to help better understand the question. I will also post my .cpp and .h files. I am writing the data to an outfile. Also, it M

A Program To Calculate Volume Flow Rate

I need writing a program to calculate the volume flow rate in cubic feet per second of water flowing through a pipe of diameter d in inches and a velocity of v feet per second. The formula for the flow rate is given by Q = area * velocity Where area= πd² /4 in square feet.

C++ char array program

Please help with the following problem. I'm having trouble with a program that is supposed to search message.txt and print out the message. i will upload instructions. We must use functions, and we were not instructed on how to search char arrays for this purpose and I am lost. Your help would be greatly appreciated! Ent

working with 2d arrays and functions

I'm to write a program to do calculations with a 2-d array. The following functions are to be developed to support a new development initiated by a local Multi-Optimal-Dimension Company (MAD COMP). Your program should handle any two dimensional array up to 100 by 100. (Dimension your array 100 by 100) You will need two array

C++ File Input Output and Functions Using Dev C++

I'm having trouble with a program that uses functions. It reads data from a file and then we are to write it out to a file. I'm having trouble manipulating the data. I will attach the code I have along with the input file and instructions. I am using dev c++ (my output to screen was for me to check my program. I have not writte

C++ sphere objects in linked list

Write a program that instantiates four sphere objects (assigning a radius to each instance) and adds them to a pointer-based linked list. Include a function to display the statistics of each sphere in the list. // *************************************************** // Header file for the class sphereClass. // **************

Impletation of a Calculator Class in C++

See the attached file. The main function is provided that will create an object of the calculator class and calling methods from this object. The calculator class definition will have to be defined in the "calculator.h" file. The class should have the prototypes for all the methods called in the "main" function and a private

Creating a Big Number Addition Program in C++

Hi, I need assistance with this program. Here is a program in which i used arrays to add big numbers. I need this program to use pointers now instead and to have no [ ]'s except in a single declaration for each array. I am still struggling with using pointers. Any assistance would be appreciated. Please see attached file.

c++ Prime Number

Hi, I need some assistance with this assignment. It is dealing with pointers. I have attached the assignment and the specs. I have learned how to code and to declare pointers and that is about all I know really. Help would be appreciated, thanks! CS 318 Prime Numbers? You are to find all the prime numbers between 90,000

C++ Programming: Constructors and Destructors

Please help identify the following statements as either true or false. If an answer is true, I need to explain why and, where appropriate, provide an example. If the answer is false, I also need to explain why. a. Constructors can have names different from their classes. b. Destructors have default arguments. c. If a progr

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