Share
Explore BrainMass

C++

C++: Arrays, Pointers and more

1. Explain how an array works. 2.Define the purpose of a pointer. Provide an example of how it can be used 3. What are the drawbacks to using pointers? 4. What risks does Open Source Development Platforms present that may not be present with Proprietary Development Platforms? Is C++ an Open Source or Proprietary Program

C++ Stack and Queue

Convert the following infix expressions to postfix notations: a. (A + B) * (C + D) - E b. A - (B + C) * D + E / F c. ((A + B) / (C - D) + E) * F - G d. A + B * (C +D) - E / F * G + H

A Vector Class in C++

Your class VectorDouble will have a private member variable for a dynamic array of doubles. It will also have two member variables of type int; one called maxCount for the size of the dynamic array of doubles, and one called count for the number of array positions currently holding values. (maxCount is the same as the capacity o

C++ Recursion

A. What is direct recursion? b. What is tail recursion? c. Suppose hat intArray is an array of integers, and length specifies the number of elements in intArray. Also suppose that low and high are two integers such that 0 <= low < length. 0 <= high < length, and low < high. That is, low and high are two indices in intArray

C++ exception classes

Suppose an exception, class myException, is defined as follows: class myException { public: myException() { message = "myException thrown!"; cout << "Immediate attention required!" << endl; } myException (string msg) { message = msg; cout << "Attention required!" << endl; } string what() { retur

C++ Programs: Loops, Input Detection

Need programs that fulfill the requirements in attached document. Write a method called check Value that will meet the following criteria: - Initializes total both to the default initialization value. - Get input for the starting number (assume important statement is already present) - Set total to the input above. -

C - Write a Function that Accepts a Score for a Driver's License

(Please include comments in the code). It is required that in all assignments a Cast should be used to convert float to int. 1- Write a function that accepts a score for a driver's license facility, an int or a float, and returns a letter. If the score passed in is less than 75, then the letter returned is an F for Fail. Ot

Data Structures - C++

Convert the following infix expressions to postfix: a) a + b*c b) (a+b)/(d-e) c)(b^2-4*a*c)/(2*a)

Data Structures + C++ STL

Give the value of v.size() after executing each of the following statements: (Be sure to include the code used to execute the statements. One program will be fine to execute all statements, no need to write multiple programs.) vector<int> v(25); v.push_back(-4); v.resize(40); m = v.back(); v.pop_back();

C++ Student Gradebook Program

Write a program, use class to create many fields: Name,DOB,Address,Class,Mark,Average mark. Allow user save data to a text file, user also can add more students, can delete student, edit info about student. Write it in type of menu Drawing flowchart for this problem Please use C++, don't use C.

C++ String Class Counter

Write function to count the number of sentences entered into a string class. Assume a sentence ends in either a period, question mark or exclamation mark. Count the number of words as well as the sentences and return and average the number of words per sentence. Attached is what I have done so far.

Matrix Multiplication Program Using Arrays

Attached are the requirements for the program. You are going to write a program to multiply two matrices. The matrices are stored in a two-dimensional array: int[][] matrixA int[][] matrixB Recall: Here is the way to declare a two-dimensional array: int testArray[3][4] = {{1,2,3,4},{2,3,4,1},{5,4,3,0}}; // three rows,

Classes and Data Abstraction

Consider the definition of the following class: class CC { public: CC(); //Line 1 CC(int); //Line 2 CC(int, int); //Line 3 CC(double, int); //Line 4 . . . private: int u; double v; }; a) Give the line number containing the constructor that is executed in each of the follow

Classes and Data Abstraction

See attachment. Please do not make the code very complicated on this C++ program. The topic is Classes and Data Abstraction. Please make sure to use this concept for the program.

Buffer-overflow is a common computer security concern

Please help with the following problem. Buffer-overflow is a common computer security concern. Write a simple program, in C, C++, and Java, to declare a simple one-dimensional array and then attempt to access an array element that is not within its bounds. For example, what happens if I declare an array to be in studentNums[

Arrays and Strings

Consider the following function main: int main () { Int inStock [10] [4]; Int alpha [20]; Int beta [20]; Int gamma [4] = {11, 13, 15, 17}; Int delta [10] = {3, 5, 2, 6, 10, 9, 7, 11, 1, 8}; . . . } a) Write the definition of the function setZero that initializes any one-dimensional array of type int to 0.

Modify Attached C++ Procedural Program

Hello , I would like this program modified to input the amount of the mortgage, the term (years) of the mortgage, and the interest rate of the mortgage. 1) What the to display the mortgage payment amount. 2) I want to allow the user to loop back and enter new data or quit. *** Any percentage such as 6.35 rate 20 yr lo

Multidimensional Arrays and Vectors

I need the following in C++ Suppose that a certain automobile dealership sells ten different models of automobiles and employees eight salespersons. A record of sales for each month can be represented by a table in which each row contains the number of sales of each model by a given salesperson and each column contains the n

C++ Program - Division

Write a program, using C++ that prints to screen the results of dividing 23 by 5, where 23 and 5 are ints. Provide the results of what was printed to screen via comments in the program ; need in hardcopy.

Classes and Enumerators Using C++

Use the type Date (consisting of a month name, day number, and a year number) to develop a class Event to model events scheduled for specified dates. use this class in a program that reads several events and stores these in a vector of Events. After all the events have been entered, the program should display a schedule of eve

Multidimensional Arrays and Vectors

A certain professor has a file containing a table of student grades, where the first line of the file contains the number of students and the number of scores in the table; each row of the table represents the exam scores of a given student and each column represents the scores on a given exam. The maximum possible score on eac

C++

In C++ Write an if else programe that given a state, return its capital? Maryland - Annapolis Massachusetts - Boston Michigan - Lansing Minnesota - St. Paul Mississippi - Jackson Missouri - Jefferson City Montana - Helena Nebraska - Lincoln Nevada - Carson City New Hampshire - Concord New Jersey - Trenton New Me

Greatest Common Divisor (GCD) in C++

I need the following problem in C++ with a recursive function and a driver programe to test the function ? * A recursive program to calculate the Greatest Common Divisor of two integers using the Euclidean Method. The algorithm in non-recursive form is as follows: EuclidGCD(a,b) { while (b not 0) { swap(a,b) b = b

How to control variations in program

Since every program that is created is different from every other program, what are the variations that we look for and how do we control them?

C++ Programming Language

Please modify the attached program so it will satisfy the below requirements: Write the program as a procedural C++ program. Allow the user to input the amount of a mortgage and then select from a menu of mortgage loans: - 7 year at 5.35% - 15 year at 5.5% - 30 year at 5.75% Use an array for the different loans. Displ

isbns from two different tables

I have a query that starts with the line: SELECT books.isbn, order_lines.isbn ...why would I want to see isbns from two different tables? What sort of query would warrant that - an inner join or an outer join? Assume the table "books" contains books that the company stocks. Assume the table order_lines only