Explore BrainMass

Explore BrainMass

    C++

    BrainMass Solutions Available for Instant Download

    Implementation Approach to Class Communication

    Interested in a sample program where two classes communicate with each other per the following requirements: Consider two classes: Foo and Bar, where Foo is a sender, and Bar the receiver. Foo allocates 3-1 megabyte chunks of memory. The first chunk is filled with the value 0xA5, the next chunk with value 0xB5 and the third

    Matrix Identity in C++

    Write a function in c++ Isidentity (t) t is two dimensional array. (int t[rwos] [columns] return true, if it is an identity matrix, return false if it is not like example square tolls colum all 1's on principal diagonal, otherwise 0's 1 0 0 0 1 0 0 0 1 Note: This is a c++ question. This is not a math questions.

    Fibonacci Number using Visual C++

    I need help to writing a program "VC++.net" with the specified input and output. Use a computational program or programs you have written to do the following exercises. Given any non-negative integer n, a.Find the nth Fibonacci number using iteration. b.Find the nth Fibonacci number using recursion. c.Compare the

    Chinese Remainder Theorem Visual C++.NET 2003 (3)

    I need help to writing a program "VC++.net"with the specified input and output. Please, Implement the Chinese Remainder Theorem. Allowing at least 3 pairwise relatively prime positive integers. Example: Problem #1 Solve p1: x = 2 (mod 3) p2: x = 3 (mod 5) p3: x = 2 (mod 7) From p1, x = 3t + 2, for some in

    Chinese Remainder Theorem Visual C++.NET 2003

    I need help to writing a program "VC++.net"with the specified input and output. Please, Implement the Chinese Remainder Theorem. Allowing at least 3 pairwise relatively prime positive integers. Please attention This program must run in the Visual C++.NET. Some time I have problem with that, so, please the whole project in

    Problem with VisualStudio.Net C++ (2003)

    I have still problem with VisualStudio.Net C++ (2003) I can't run almost all of program that already worked. when I do "copy" and "past" These program, in Microsoft Visual Studio .Net C++(2003), all send same error: f:Assignment-1stdafx.cpp(9): fatal error C1083: Cannot open include file: 'iostream.h': No such file or direc

    Problem with Microsoft Visual C++ Cannot open include file

    I have problem with Microsoft Visual Studio .Net 2003 C++ I can't run almost all of program that already worked. when I do "copy" and "past" these programs in Microsoft Visual Studio .Net C++ , all these program send same error: f:Assignment-1stdafx.cpp(9): fatal error C1083: Cannot open include file: 'iostream.h': No such

    Logic and Bit Operations(C++)

    Use a computational program (C++) you have written to do the following exercises. Given two bit strings of length n (n equal or bigger 16), find the bitwise AND, bitwise XOR of these strings. Example: 01 1011 0110 11 0001 1101 --------------- 11 1011 1111 (Bit wise OR) 01 0001 0100 (Bitwise AND) 10 1010 1011 (B

    C language compilers data type

    There are at least two types of integers (short or long) and two types of decimals (float or double) in most C language compilers. We should write all the programs using longs and doubles without ever needing shorts or floats. What do you think was the idea of adding these two additional (smaller) types?

    C++ code to recognize comments using /* and */

    I am attempting to teach myself some basic C++ programming and in working my way through a Programming Languages book, I have come across a question I am having difficulty with. The problem is two-fold. The first is to design a state diagram to recognize one form of the comments of the C-based programming languages, those th

    Building Classes

    The point-slope equation of a line having slope m and pasing through pint P with coordinates (x1, y1) is y-y1=m(x-x1). a. Write a class for a CartesianPoint, described by its x- and y- coordinates, with all appropriate operations on such objects. b. Write a LineSegment class, described by two CartesianPoint endpoints. I

    Operations and Expressions

    Write a program that reads three real numbers, assigns the appropriate boolean value to the following boolean variables, and displays the associated values. Triangle: true if the real numbers can represent lengths of the sides of a triangle (the sum of any two of the numbrs must be greater than the third); false otherwise.

    Functions

    Write a function that if given the number of hours ruturns the number of seconds. **Note: Answer must be in C++ code

    Developing Complete C++ Project on Circle Radius and Area

    Create a project that if given the radius of a circle returns the area using the formula PI*r(squared). Create a header file, an implementation file, a documentation file, and a driver program to test the function. **Note: This must be accomplished in C++ code.

    Types

    Programming Problem (Types) -------------------------------------------------------------------------------- Write a program to convert a measurement given in feet to the equivalent number of (a) yards, (b) inches, (c) centimeters, (d) meters (1 ft = 12in. 1 yd = 3 ft, 1 in. = 2.54 cm, 1 m = 100 cm). I need this solut

    Procedures

    Write a simple near procedure (such as a return) and call it using direct addressing. Please provide in C++.

    Correction of C++ Code with Examples

    See the attached file. #include <iostream.h> /* 1) Please correct the errors with replacement lines beside it. And then give short notes on why it is wrong. */ class Person { private: char name[30]; int age; public: // Person (string, int); //string is not a built in class or data-type //you must either d

    How to find errors in C++ source code ?

    Please correct the errors with replacement lines beside it. And then give short notes on why it is wrong. The code is attached. 1) Please correct the errors with replacement lines beside it. And then give short notes on why it is wrong. class Person { private: char name[30]; int age; public: Person (st

    Designing a SoccerPlayer Class

    1. Complete the following tasks: a. Design a SoccerPlayer class that includes three integer fields: a player's jersey number, goals, and assists. Overload extraction and insertion operators for the class. b. Include an operator> () function for the class. One SoccerPlayer is considered greater than another if the sum of goa

    C++ Programming

    1. Create a class named Veterinarian. Include the doctor's name, address, and phone number. Create a class named Pet with the Pet's name, owner's name, age of Pet, breed of Pet, and veterinarian's name. Both classes contains set and display functions. Create a Pet class member function that displays the Pet's name, owner's

    C++ Programming

    A) Define a class named GroceryItem. Include private fields that hold an item's stock number, price, quantity in stock, and total value. Write three public functions that each set one of the three fields, based on user keyboard input. The function that sets the stock number requires the user to enter exactly four digits; con

    CoffeeOrder for C++ Programming

    Define a class named CoffeeOrder. Include private integer fields that you set to a flag value of 1 or 0 to indicate whether the order should have any of the following: cream, milk, sugar, or artificial sweetener. Include a public function that takes a user's order from the keyboard and sets the values of the four fields in re

    program that asks the user for two integers and a character

    Write a program that asks the user for two integers and a character, 'A', 'S', or 'M'. Call one of three functions that adds, substracts, or multiplies the user's integers, based on the character input. This is what I have so far but I cant figure out how to link the character data A, M, or S to the specific funtions. #i

    C++

    Write a program that asks the user for two integers and a character, 'A', 'S', or 'M'. Call one of three functions that adds, substracts, or multiplies the user's integers, based on the character input.

    Possible Windows Crashes C++

    1. Why does Windows frequently crash? Microsoft hires (according to them) the best programmers in the world. Why can?t they get it right? 2. Why use functions at all? Programs can be written without them, so why bother with all the overhead?