Share
Explore BrainMass

C++

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

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

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++ l. Create a program to determine the smallest number out of 15 numbers entered (numbers entered one at a time from the keyboard). This should be done in prototype: double smaller (double x, double y); Make sure you use a for loop expression inside your function. Be sure to include your program prompts for input and a display of the smallest number when you have found it. 2. You are a mortgage broker who is determining whether you should provide a mortgage to perspective home purchasers. If you are willing to provide a mortgage, you need to decide how much you should charge the borrower. You design a point system that assigns perspective borrowers a score of 1,2,3,4, or 5 based on some mysterious formula. Based on these scores, you come up with the following decisions: Score Decision 5 Provide mortgage at 5% interest rate 4 Provide mortgage at 6% interest rate 3 Provide mortgage at 7% interest rate 2 Do not provide mortgage 1 Do not provide mortgage Create a program that takes the scores as input and provides as output the management decision. In the program, include 2 void functions titled getScore and printdecision, each with an int argument. ? The function getScore should have a Reference parameter that gets the score in getScore and then passes the value back to be printed in main (), and ? print Decision should have a Value parameter. The function getScore will prompt the user for the integer score from 1 to 5, get the input from the user, and display the input received on the screen. The function printDecision will determine the mortgage decision and print the decision. (Be careful and note that this problem requires you to input the score into getScore and not directly into the main function.) 3. Define a class called Date that has 3private members that represent the month, day, and year respectively. They will be represented as integers. Include a constructor and a public void function called print that prints out the date. (For example, if the month is 2, the day is 25, and the year is 1946, print provides as output 2/25/1946.) Include the class in a program that prints out the date 2/25/1946.

L. Create a program to determine the smallest number out of 15 numbers entered (numbers entered one at a time from the keyboard). This should be done in prototype: double smaller (double x, double y); Make sure you use a for loop expression inside your function. Be sure to include your program prompts for input and a displ

Functions and Structures

See the attached file. Need some help with a practice problem: Using the supplied code, make the following modifications: a) Place the account record into an appropriate structure, and store the accounts in an array of structures. b) Use a function to do the account lookup. The function must use the follo

C program working with arrays, list, macro

1.Begin this program by creating two arrays of integers, each holding ten elements of data. Create a third array of integers for a result array. Your main program will take the two arrays of integers and pass them to the function subtract(). Inside the function, subtract the first array from the second array and put the differen

Practice Program Loops, Simple I/O & Simple Calculations

Need Some Assisstance With A Practice Problem: Be sure you have access to an ANSI C (not C++) compiler. Code compiles for C++ may or may not be compatible with C. Assignment 1. You are to write the basis for what will become, in increments, a small "banking system." This first increment just maintains up to 25 acc

Creating Classes in C++

I am very confused with classes in C++. I need help with my problem below: Create a class called car. Have several variables with the necessary variables that that store, gas level, amount of gas, gear car is in, car in motion.. etc Have functions that do: Check the battery level Check the gas level Turn r

Create three arrays of 20 integers each

1 Create three arrays of 20 integers each. Fill in two arrays with data, leaving the third blank. From main, pass these three arrays into a function. Inside the function, add the value of each array element and store it in the third. third_array[i] = second_array[i] + first_array[i] Back in main, print out the value of ever

C++ Mortgage Calculator Reading a Sequential Files

Here is what I need to do to completion this assignment: Write the program as an object-oriented C++ program that allows the user to select which way they want to calculate a mortgage: by input of the amount of the mortgage, the term of the mortgage, and the interest rate of the mortgage payment or by input of the amount of a m

Create a program to determine the largest number out of 15 numbers entered

I need help with these problems Create a program to determine the largest number out of 15 numbers entered (numbers entered one at a time). This should be done in a function using this prototype: double larger (double x, double y); Make sure you use a for loop expression inside your function. Enter 15 num

Answer the questions based on given hash function object type.

Consider the hash function object type Class hFint256 { Public: unsigned int operator() (int item) const { Return (item/16 % 256); } }; (a) What is the size of the hash table? (b) What are hFint256() (16) and hFint256() (257)? (c) In general, what is the action of the hash function?

Data Structures with C++ Using STL

Binary Trees: 10.26 Use the following tree, in its original from, for each part of this question: ---- See Attached. --- (a). If the value 33 is inserted into the tree, which node would be its parent? (b). If the value 72 is inserted into the tree, which node would be its parent? (c). If the root node 50 is de

C++: Delete largest value from the list (priority queue)

Assume that a doubly linked list "header" stores the elements of a priority queue. Implement the function pop(), which deletes the element with the largest value from the list (priority queue). template < typename T > void pop(dnode< T > *header); Here is my best Guess at the problem! { if ( header->next = = header)

C++ OOP Problem

I need help, I can't seem to get my program right. I have a tendency to do it in Java and not C++. Thanks Write the program as an object-oriented C++ program that allows 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%. Us

Programming Questions

1. Cross (2007) discusses the advantages for a software company to release beta versions instead of final versions of products. What is Cross's reasoning? Do you agree with it? Explain why some companies may avoid beta releases from software companies. 2. Read the "Q&A with Bjarne Stroustrup..." article (2007) and pick one

C++ Program

Write a program that lets the user perform arithmetic operations on fractions. Fractions are of the form a/b, where a and b are integers and b is not equal to 0. Your program must be menu driven, allowing the user to select the operation (+, -, *, /) and input the numerator and denominator of each fraction. Your program must con

C++ Program

Create a class called CollegeCourse with Functions: 1. Average()- a function template that will accept two arguments(HonorPoints of the same data type) and computes the average of two HonorPoints a. The HonorPoints = grade points (4 for an A, 3 for a B, 2 for a C, and 1 for a D) multiplied with the credits 2. Averag

A C++ Program that Shows How to Read Files

See the attached file. Assist with writing ideas a program that uses the attached data file as input and does simple data encryption. Replace each letter of the alphabet with the next letter. For example, a will be replace by b and b will be replaced by c. The letter z will be replaced by a. Numbers, spaces, punctuation and sp

C++ program (using bloodshed dev-pascal)

Im having trouble writing a program that does the following. the program should sum up inventory counts and report the total. the inventory is represented by a three digit inventory and a count of the items. in the data is a problem, their are two different inventories that have been mixed up in the list (on purpose). the inven

C++ Sequential file Calculator

See attached. I already completed the sequential file (mortgage_14.cpp) and the addtional files attached. I lost my way somehow. the assignment: Further modify your program so it allows the user to select which way they want to calculate a mortgage. 1- by input of the amount of the mortgage, the term of the mortgage,

Program in C++

Develop a C++ program to solve the problem described below: The cashier's office needs a C++ program that they can use to keep track of a cashier's daily financial transactions. The user (cashier) will load the program just before he/she opens for operation each day and continues to use the program until he/she is done for

C++ array program

I have a program i'm having to write for a c++ class. it is dealing with arrays and while loops. we also have to get data from a file, and write it to another. my problem is i can't get it to read the data from the file. here's what the program should be able to do with the data. 1) print out all data in the array with no

C++ Mortgage Calculator with sequential file

Attached is a copy of my program. I rewrote my code. Now I am receiving syntax errors. Not working properly. The Object Oriented Program allows the user to select which way they want to calculate a mortgage: (1) by input of the amount of the mortgage, the term of the mortgage, and the interest rate of the mortgage payment or