Share
Explore BrainMass

C++

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[

Use C++ to implement the state diagram.

Need help with Programming question. Use C++ to implement the state diagram. Design a state diagram to recognize one form of the comments of the C-based programming languages, those that begin with /* and end with */. Write and test the code to implement the state diagram of Problem 1.

C++ Vector: Computing average and maximum of real numbers

Write a program that declares a vector of real numbers and input values until a 0 is entered. Add the values to the vector by using push_back(), and compute both the average and the maximum value of the numbers. Output the average and the maximum. Use the upcoming statements that intialize max to have the value -infinity. The

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

C++ Programming - Mortgage

I want to create a procedural C++ program that calculates and displays the mortgage payment amount that will display mortgage amount, the term of the mortgage, and the interest rate of the mortgage. I would like to use specific variables for the amount, term and interest rate, but hard code them to use: amount = $300,000.00, ter

What is so special about OOP

Can you please help with the following study question? Thanks What is so special about OOP? Why is it so widely used nowadays? What do you gain and what do you lose when using OOP? Which other programming languages (except for C++) can be assigned to the category of OO languages? Does the development of OOP mean "death" of pr

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

Multidimensional Arrays and Vectors

**I need the following in C++** The output needs to be in a table format. A company has a product line that includes five items that sell for $100, $75, $120, $150, and $35. There are four salespersons working for this company, and the following report is for a given week: Salesperson

Matching Grouping Symbols in Arithmetic Expression in C++

Write a C++ program that outputs appropriate messages for matching grouping symbols, such as parentheses and braces, in the input arithmetic expression. For example, the expression "{25+(3-6)*8}" contains matching grouping symbols (curly braces and parentheses), while in case of "[25+{3-6)*8]" only matching grouping symbols a

C++ program to process text file

Write a C++ program that reads a text file and counts the characters in each line. The program should display the line number and the length of the shortest and longest lines in the file, as well as the average number of characters per line.

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.

Programming Concepts

Program code can be organized through the use of functions. What are the criteria on creating functions? For example, do you limit the function to a certain number of lines of code, to a set of common function? The C/C++ language has two different types of conditional statements (if-else and switch-case). What do you see as t

C++ Change Program

Write a function that accepts the cost of the purchase and the amount of the payment as functon parameters, and the prints on the cashiers console how much change to give (how many bills and coin). Consider denominations of 1cent, 5 cents, 10 cents, 25 cents, $1, $5, and $10.

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

Building Classes

Write a program to do rational number arithmetic, representing each rational number as a class that has instance variables for the numerator and the denominator. The program should read and display all rational numbers in the format a/b, or simply a if the denominator is 1. I have enclosed what I have however it doesn't work ri

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

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