can someone help me figure out how i would relate composition and aggregation to a Person class that is composed of another class that is composed of another class and also includes itself in it. It also has a deep copy, a destructor, and all appropriate accessors and mutators in it as well.
#include "Date.h"
#include <cstring>
class Person
{
public:
Person(string name,...
User Profile
Collapse
-
what i have to do is use a switch statement inside a do while but my while statement isn't functioning correctly. here's what i got:
[code=cpp]
do
{
//Invokes the void displayMenu function
displayMenu();
cout << endl;
//Prompt user for selection
cout<<"Please enter your selection (use uppercase letters):";
cin>>selection;
switch... -
can someone point me in the right direcction?
i need help in trying to figure out the first step in displaying a menu and invoking different functions depending on which menu item the user selects by reading and writing to a file.
can you help?Last edited by sicarie; Mar 17 '08, 12:53 PM. Reason: please read the Posting Guidelines, we ask that you post only the relevant snippetts of code -
-
need some help with my documentation
can someone help me to document my code quickly?
//Name: Cassi Smith
//Date: March 5, 2008
//Assignment: Chapter 12 Inventory Management System
//Description: This header file makes available the functions that can be reused
by the client and data fields t
#include <string>
using namespace std;
class InventoryItem
{
public:
InventoryItem() ;... -
she's not in school---her boss sent it to her and asked her to solve it. she forwarded it to me and i can't do anything to it because we're just starting out with classes in my c++ class, so i told her i can't helpLeave a comment:
-
Just received this question in an e-mail....I'm stumped
I just received this e-mail from a colleague of mine that got stuck and she sent it to me and i'm stuck....we're wondering what this is all about.....can anyone help?
Inventory Management System
The inventory management system is designed to be used primarily by warehouse workers. The system must use a simple command line driven interface as the only method of interaction will be by keyboard.
... -
can someone explain this class problem to me?
I'm having a hard time understanding objects and classes...this is the problem...Defin e a class named Movie with private fields for the title, year, and name of the director. Include public member functions. Write a program that declares an instance of the Movie class called myFavorite. Prompt the user and the member fields (properties), then display the properties to std out.
all i have are the prototypes which are:
... -
#include <iostream>
using namespace std;
class Car
{
public:
Car myCar;
int main()
{
//Declare variables
int year;
int mpg;
system("pause") ;
return 0;
}...Leave a comment:
-
i don't what to do after that....my code looks all messed up.......Leave a comment:
-
i'm confused
i'm having trouble understanding this problem...can someone explain to me what to do?
Define a data structure named Car that stores two values: year and miles per gallon. Write a program that declares a variable of the Car type. Read in values for each field from stdin, then output the stored values to stdout.
this is what i have so far:
class Car
{
public:
int year;
... -
i'm just trying to freshen up on my skills... here's what i got so far on the first problem...its wrong but i tried...
int main()
{
int myArray [5]={22,23,34,45,1 2,}
int *myArray = new int [size];
for ( int i = 0; i<size; i++)
{
cout<<(myArray+ i);
}
return myArray;
this is the first...Leave a comment:
-
-
He's in the class that i'm doing my student teaching...the teacher just gave me these problems to see if i could work them out but I haven't taken C++ since high school...Leave a comment:
-
need help with programming
Can someone help me explain these problems? I'm trying to teach my little brother how to code these ....
1. Write a function that accepts a pointer to an array of integers and a single integer. Search the array for the integer and return a pointer to that element in the array. Do not use array notation.
this is what we have so far: void printArray() (I know this is wrong)
2. Write a function that accepts an integer,... -
Please help urgently!
I need to get this done before midnight tonight and I really need some help...Can someone show me how to code these problems? I have to show the rest of the class how to code it
1. Write a function that accepts a pointer to an array of integers and a single integer. Search the array for the integer and return a pointer to that element in the array. Do not use array notation.
2. Write a function that accepts an integer,...
No activity results to display
Show More
Leave a comment: