Explore BrainMass

Explore BrainMass

    C++

    BrainMass Solutions Available for Instant Download

    C++ problem program code member functions

    Write a program, employe_data.cpp, with the Employee class that has two employees; sets their age, yearsOfService, and salary (rounded to the nearest thousands of dollars; and prints their values. (you will need to write the code in member functions.) And, Change the Employee class such that you can initialize age, yearsOfSer

    Visual C++

    The following class uses composition to define a line object in terms of two point objects. class line { public: Point startingpoint(); point endingpoint(); float length(); line (int startX, int startY, int endX, int endY); private: point startPoint; point endPoint: }; 1) write a fucntin defintion for the Lin

    Visual C++

    Give the class declaration class point { public: int xcoordinate(); int ycoordinate(); point(in initializeX, in initialize Y); private: int x; int y; }; 1: Suppose we have a type declaration as follows: enum status {on, off}; declare a class Pixel that inherits from class Point. Class Pixel will have an ad

    Visual C++ Classes

    Write a program that read in an integer. If the integer is a negative number, catch the exception and print an error message "Invalid Integer: value negative" and prompt the user for another number. If the integer is zero, catch the exception and print a message, "Integer cannot be zero, and end the program. Otherwise, just pri

    Write a C++ program to output the binary

    Write a C++ program to output the binary (base-2) representation of a decimal integer. The algorithm for this conversion is to be repeated dividing the decimal number by 2 until it is 0. Each division produces a remainder of 0 or 1 which becomes a digit in the binary numbers. example the decimal number 25 25/2 = 12 rema

    Visual C++

    Write a C++ value returning function that implements the recursive formula F(n) = F(n-1) + F(n+2) with base cases F(0)=1 and F(1) =1

    Crossed and inverted words

    I need a program that when a word is entered knows if the word is odd or even of characters and if it is odd it should display the word in a cross and if it's even it should display the word inverted. Example: Microsoft M M i i c c r r o s s o o f f

    Binary Trees: Family Tree of Two Generations

    Create a program that uses the structure of binary trees to make a family tree of two generations. The user should input the names when asked, and then the program should display the names. Please see the attached Image1.jpg on how the program should store its data.

    Priority Queues (C++ Programming)

    I need a program that uses the structure of priority queues that implement the right way to take care of an emergency room. Priorities: 1. Respiratory failure 2. No circulation 3. Hemorrhages It should be taken in consideration that if exists two persons with the same level of priority the first one to arrive is the fir

    Operating System Process Simulator in C++

    The program must be done in C++. The program is not in Visual C++, in other words it must show everything in the command prompt window. Please use cout and cin and not printf and scanf nor other C standards See attached file for full problem description.

    Inheritance - SalariedEmployee - C++

    Write a program that uses the class SalariedEmployee shown below. Your program is to define a class called Administrator, which is to be derived from the class SalariedEmployee. You are allowed to change private in the base class to protected. You are to supply the following additional data and function members: A member vari

    Strings and Vectors C++

    Write a program that can be used to train the user to use less sexist language by suggesting alternative versions of sentences given by the user. The program will ask for a sentence, read the sentence into a string variable, and replace all occurences of masculine pronouns with gender-neutral pronouns. For example, it will repla

    Strings and Vectors C++

    Please enhance this program. Write the definition of the readAndCount function. The function should read the input line, character by character, counting the number of words (a sequence of letters) and the number of occurrences of each letter. The array to hold the number of occurrences of each letter is the parameter let

    C++ Names.cpp

    Write a program that reads a person's name in the following format: first name, then middle name or initial, and then last name. The program then outputs the name in the following format: Last_Name, First_Name Middle_Initial. For example, the input Mary Average User should produce the output: User, Mary A. The inp

    queue and stack in C++

    I need two separately programs from the same code. 1.) Modified the code so it has a Pop() function that makes the function of a Queue. Example: Input: Enter Id: 1 Enter Name: Ana Enter Id: 2 Enter Name: Carlos Ouput: (After a pop): Id: 1 name: Ana 2.) Modified the code so it has

    Friends and Overloading Operators C++

    Complete and test this exercise. Implement the default constructor and the constructor with one int parameter. Overload the + and - operators to add and subtract percents. Also, overload the * operator to allow multiplication of a percent by an integer. Write a program to test all the member functions and overloaded operator

    Infinite Loop C++ Programs

    Can you find a bug in this program and then fix it so that it won't have an infinite loop? #include <iostream> #include <fstream> using namespace std; void CalculateAvgScore(ifstream &fIn,ofstream &fOut); int main(int argc, char *argv[]) { ifstream fin; ofstream fout; char inFileName[20],outFileName[20];

    I/O Streams

    Write a program that reads text from one file and writes an edited version of the same text to another file. The edited version is identical to the unedited version except that every string of two or more consecutive blanks is replaced by a single space. Thus the text is edited to remove any extra blank characters. Your progr

    C++ Programming: Inputting Courses and Students

    Please assist with providing a program that will ask the user how many courses he wants to input and how many students he wants to add to each course and the name of each student. Example of a run: INPUT: How many courses? 2 Enter the name of the #1 course: Structure Programming Enter the how many students: 3 Enter t

    C++ Programming Mega Numbers

    I need a program that will add mega numbers (20 digits). It has to be done with arrays. Example: INPUT: 2 numbers of 20 digits 12345678901234567890 12345678901234567890 OUTPUT: 12345678901234567890 12345678901234567890 +_____________________ 24691357802469135780

    function that receives an array of integers of 3 elements

    I need a program that contains a function that receives an array of integers of 3 elements. The function must implement a "shift" to the right. For example if the numbers 1 2 3 are entered, after passing to the function the values must be 2 3 1. The program must display the two values.

    Simple linked list C++

    When I typical write a linked list class to store int values I would setup the class something like this.... struct Node { int _item; Node *_next; }; Node *_head; However, I know have to write a program that will use IntNode.h to create a linked list implementation. The way the designer setup this .h file is

    convert a octal value for UNIX file permissions to a text value

    Can anyone explain to me how to convert a octal value for UNIX file permissions to a text value to display on screen. For example I need to write code in C++ that would take in octal value 100666 and display rw-rw-rw I have found this information but still can not figure out the conversion. Octal digit Text equivalent Bin

    Data Structures C++ Submitted

    Explain the following code line by line, and submit your answer: shortestPath() & printShortestDistance() in weightedGraph.h

    Problem with Data Structures C++

    All doctor offices have not become 100% computerized yet. You can still see good % of offices use manual patient record files indexed by the first letter of patients' last names. Is this manual search close to searching in a sorted array or in a sorted linked list? Write your thoughts.

    C++ Functions and Responses

    C++. See attached file for full problem description. Question 21 Refer to the figure above. Which of the following members in the UML diagram adds an element to the front of the queue? front addQueue back None of the above Question 22 An effective way to implement a priority

    C++

    C++. See attached file for full problem description.

    C++ explained in this solution

    C++. See attached file for full problem description. Thank you so much! Question 31 A queue is modeled on a ____ structure. LIFO FIFO stack list Question 32 The function deleteQueue does which of the following? uses one queue to delete another removes the back