Share
Explore BrainMass

C++

A C++ program to calculate the volume of various shapes

Using C++ write a program that: 1. asks the user for the dimensions of a box (width, height, and depth), 2. prints the volume of the box, 3. prints the volume of the largest cube that could fit inside the user's box, and 4. prints the volume of a sphere with a diameter equal to the largest dimension of the user's box.

C++ Programming Questions

1. Using the switch statement, write a program that will request an integer from the user in the range 1 - 5. It should then output a message in this form: You entered the number one. {or two, or whatever was entered} If the user entered a number other than 1 - 5, the program should output a message to that effect. Note that

Create a simple airline ticket reservation program in C++.

Create a simple airline ticket reservation program in C++ that keeps track of individual passenger names, and their associated flight numbers, departure dates and times, and originating and destination cities. You may implement your own linked list library; however, it is recommended that you make use of the linked list API in t

Books listing program using binary tree

The program in the attachment uses an ordered linked list. Summary report menu selection shows all books in sorted alphabetical order and report by year menu displays books in ascending order by publish year. Keep this format, but modify the program to make it use binary tree instead of ordered linked list. You may use more than

C++ program to gauge the expected inflated cost of an item

It is difficult to make a budget that spans several years, because prices are not stable. If your company needs 200 pencils per year, you cannot simply use this year's price as the cost of pencils two years from now. Because of inflation the cost is likely to be higher than it is today. Write a C++ program to gauge the expect

MiniVector Project

Directions Points The file must be called week3-4Prog.cpp This program will store in miniVector v a list of 15 random integers from 0 to 99, then it will output the vector, sort the vector, then output it again sorted. Program Definition 1. Create program definition with the following templates and methods: // out

Recursion Implementation

1. Modify this pop() function, so that it uses recursion. int Stack::pop() { if (isEmpty()) { cerr << "Attempting to Pop from an Empty stack!!" << endl; return -1; } else { int temp = nodes[curTop]; curTop--; return temp; } } 2. Rewrite th

Output of C++ Code Fragments

1. What is the output of the following C++ code? int x; int y; int *p = &x; int *q = &y; *p = 35; *q = 98; *p = *q; cout << x << " " << y << endl; cout << *p << " " << *q << endl; 2. What is the output of the following C++ code? int x; int y; int *p = &x; int *q = &y; x = 35; y = 46; p = q; *p = 78; c

Write a C++ program with 4 classes called A,B,C and D

Write a C++ program with 4 classes called A,B,C and D. D should inherit C, C should inherit B and B should inherit A. All classes should have 1 data member of type int, 1 constructor and 1 function called print. The constructor should initialize the data member to a rand() value. The print function should display the data member

Complete the given C++ program.

When run, the following program should display following on screen. 90 225 Complete the class TT in order to make the program run. #include < iostream > using namespace std; class TT { protected: int value1; int value2; public: TT(int i=0, int j=0) { value1 = i; value2 = j; } .

C++ Flight class

Write a C++ program that has a class called flight with the following attributes: date, flight_no, from, to, seats, price. Create an array of 3 objects of this class. Write a member function that asks the user for these values, 3 times and write a function that displays these values in a tabular form on the screen.

Example C++ Program

Attached docx file gives the content of a text database file "database.txt" that contains five columns: DSI#, Person_Number, Last_Name, First_Name and State. Write a C++ program that reads the data from "database.txt", swaps the First_Name and Last_Name columns and outputs the data to another text file called "Students2.txt".

C++ Functions and ifstream

General Directions: In a party, among a group of gift-giving friends, each person sets aside some money for gift-giving and divides this money evenly among all those who came to the party (including self). However, like in any group of friends, some people are more giving than others and some people have more money than other

Customer Class in C++

Need new customer.cpp file that can implement the use of the existing header and implementation file. The new customer.cpp file will contain option to enter customers information and retrieve their information

C++

1.should C++ programming language be extended to include an XML editor and parser as is the case for the Java® programming language, or should this be built into the Integrated Development Environment (IDE) that supports the programming language? 2.should C++ be used to develop reusable service objects to support an applicat

Answer questions for C++

1. Consider int a, b; int *prt; //A pointer int **prtPrt //A pointer to a pointer ptr = &a; prtPtr = &ptr; a. Is this code legal? b. What are the values of *ptr and **ptrPtr? c. Using no other objects besides those already declared, how can you alter ptrPtr so that is points to a pointer t

C++ program showing a for loop

1. Display a prompt on the command line and accept one interger as input 2. Call a function tha outputs seven sequential intergers, with the input interger as the middle item on the command line below the input prompt. 3.If the lowest of the seven intergers is greater than zero, output the line "all non-negative intergers"

3 C++ questions !!! Functions, Arguments, XML !!!

1. How do functions evaluate arguments? also give an example and explain how data is sent to and retrieved form functions. 2. give some examples of how using a function could save you alot of time and effort? What kind of code would you put into a function? Give an example. 3. Should XML be part of C++? If so what could

C++ Program Factors and Integrals

I know that the factorial of an integer n, written n!, is basically the product of consecutive integers 1 through n. Like, if I had 8, the factorial should be calculated 8! = 8 x 7 x 6 x 5 x 4 x 3 x 2 x 1 = 40320. How should I go about putting this program into a C++? I need a prompt to ask for and integer. I have written wh

COMPUTER LABS PROJECT

You run four computer labs.Each lab contains computer stations that are numbered as the table below. Lab number Computer Station numbers 1 1-5 2 1-6 3 1-4 4 1-3 Each user has a unique five-digit ID number.Whenever a user logs on, the users's ID,lab number,and t

Create and prepare a disk file for records containing the structure used in attached file. Store the account records in the file using the same hashing/rehashing technique used for storing them in an array of structures. * i just need help storing accounts to a file instead of a structure using standard c ex: fopen fclose, feel free 2 ask any questions

Create and prepare a disk file for records containing the structure used in attached file. Store the account records in the file using the same hashing/rehashing technique used for storing them in an array of structures. * i just need help storing accounts to a file instead of a structure using standard c ex: fopen fclose,

SQL Database Security

See attached file. Details: Congratulations! You are one of the world's finest security professionals. Throughout the next few weeks, you will be living the life of travel, tight deadlines, and vague projects. Your deliverables will require the highest level of professionalism. All of your deliverables should be presented

C++: converting function to template

The following function compares integers of type int and gives as a result the smaller number. int min (int a , int b) { If (a < b) Return a; Else Return b; } Convert this function to a C++ template.

C++: capitalizing words beginning with letter "a" in a file

Write a C++ program that reads from the external file input.txt, capitalizes all words that begin with the letter "a," and then writes them to an external file output.txt . Do not forget to copy the blanks. You may wish to use infile.get and outfile.put in your program.