Explore BrainMass

Explore BrainMass

    C++

    BrainMass Solutions Available for Instant Download

    Vector class in c++

    Write a program using the vector class that allows the user to input the number of days worked in a 7 day workweek and, using a fixed hourly rate, calculates the weeks wages and the average number of hours worked per day. The program needs to be in c++ and using the vector classes.

    C++

    IN C++ Write a program that allows the user to input the number of days worked in a 7 day workweek and, using a fixed hourly rate, calculates the week's wages and the average number of hours worked per day.

    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

    English to U.S. Currency Conversion Program in C++

    Complete the following problem in C++. Repetition: Write a program that reads an exchange rate for converting English currency to U.S. currency and then reads several values in English currency and converts each amount to the equivalent U.S. currency. Display all amounts with appropriate labels. Use a sentinel-controlled or

    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

    Operations and Expressions C++

    Operations and Expressions In a certain region, pesticide can be sprayed from an airplane only if the temperature is at least 70 degrees, the relative humidity is between 15 and 35%, and the wind speed is at most 10 miles per hour, Write a program that accepts three numbers representing temperature, relative humidity, and win

    Buffer-overflow

    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[10] and then attempt to access studentNums[1

    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?

    Data Structures with C++ Using STL

    See attached file for full problem description. - Advanced Associative Structures Please provide a complete program if it makes sense. Exercise 12.13 Assume that a hash function has the following characteristics: Keys 257 and 567 hash to 3. Keys 987 and 313 hash to 6. Keys 734, 189, and 575 hash to 5. Keys 122, 391

    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

    Data Structures and Tree-Traversal Function

    Trace the following tree-traversal function, f(), and describe its action: int f(tnode<int> *t) { int sLeft, sRight; if (t != NULL) { sLeft = f(t->left); sRight = f(t->right); return t->nodeValue + sLeft + sRight; } else return 0; } Please provide a complete

    Binary Trees and Tree-Traversal

    Trace the following tree-traversal function, f(), and describe its action: template <typename T> int f(tnode<T> *t) { int n = 0, leftValue, rightValue; if (t != NULL) { if (t ->left != NULL || t->right != NULL) n++; leftValue = f(t->left); rightValue = f(t->right);

    C++ Programming: Mortgage Payment

    Please modify the attached program so it will satisfy and meet below requirements: Write the program as a procedural C++ program. Calculate and display the mortgage payment amount using the amount of the mortgage, the term of the mortgage, and the interest rate of the mortgage as input by the user. Allow the user to loop back

    Moving Elements in C++ Queue Using Template

    See attached file. Write a function template<typename T> void n2front (queue<T>& q, int n); that moves the nth element (counting from the front, which is element 1) of the queue to the front, leaving the order of all other elements unchanged. The function throws the rangeError exception if n < 1 or n> q.size(). The fig

    Data Structures with C++ Using STL

    Declare a stack, queue, and priority queue of integers, as follows: stack<int> s; queue<int> q; priority_queue<int> pq; Assume that you input the integer sequence 5 8 12 15 1 3 18 25 18 35 2 55 and insert each value into each container in the order given. What is the output of the following statements? while (

    Data Structures with C++ Using STL

    List the elements in the queue after each of the following operations: queue<int> intQueue; intQueue.push(18); intQueue.push(2); intQueue.push(intQueue.front()); intQueue.push(intQueue.front()); intQueue.pop(); Please provide a complete program if it makes sense.

    Data Structures with C++ Using STL

    What is the output from the following sequence of stack operations? stack<int> intStack; int x, y = 3; intStack.push(8); intStack.push(9); intStack.push(y); x = intStack.top(); intStack.pop(); intStack.push(18); x = intStack.top(); intStack.pop(); intStackpush(22); while (!intStack.empty()) { y = intStack.top();

    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

    trace the codes and display the resulting elements in a list

    Trace the following code, and display the resulting elements in the list: int arr[] = (1, 2, 3, 4); int arrSize = sizeof(arr)/sizeof(int); list intList(arr, arr+arrSize); list::iterator iter = intList.begin(); int i; for (i=1; i <= arrSize; i++) intList.insert(iter++, i); Please provide a complete program i

    Tranfer an array to a list

    Consider the C++ array int arr[] = (-15, 5, 35, -19, -12, 17, -4); int arrSize = sizeof(arr)/sizeof(int); (a) Declare the list object intList that holds the integers from the array arr. (b) Declare the iterator iter for an integer list. (c) Initialize the iterator iter to the beginning of the list intList. (d)

    Procedural C++ Mortgage Program

    Please help me write the program as a procedural C++ program and using a loan amount of $200,000, a term of 30 years, and an interest rate of 5.75%. Insert comments in the program to document the program.

    Data Structures with C++ (STL)

    Consider the class declaration class demoClass { public: // assign arguments as initial values for the data members demoClass(int a = 5, int b = 10); // function returns the maximum of itemA and itemB // int max() const; private: int itemA, itemB; }; (a) Give t

    Reading from a File in C++

    Please help modify this code, instead of asking the user for the matrix, it will read the matrix from a file called Data.txt. The matrix must be 4x4. See the attached file.

    C++ Linked List Pointers

    Given the attached code (see file), what is the values of the following expressions. They may be undefined or the boolean expression may be invalid a) firstptr->next->firstname b) firstptr->next-next->SSN c) firstptr->next==lastptr d) currptr->next->lastname e) currptr->next->lastname f) firstptr==lastptr->next g)fi

    C++

    Using the attached file all numbers class do the following: - write a template function for the class called Add15() that adds 15 to each of the two numbers and display the result - write a template function for the class called multiplybypoints5() that multiples 0.5 to each numbers in the parameter list and display result

    C++ Problem

    Program that does the following: delcale an integer (var1) declare a pointer (ptr1) that points to var1 declare a reference (ref1) to var1 assign the address of var1 to ptr1 print the value of var1 using the pointer use the ref1 to change the value of var1 to var15 print the value of var1 using the ref1