Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Could you solve my assignment?

Posted on 1997-04-05
3
Medium Priority
?
249 Views
Last Modified: 2010-04-10
I am a student at the University of Antwerp.  At the end of this semester I have to write a program in C++.  But C++ is new for me, and this is the first time I am writing a program in C++.  Therefor I do not know where to start with this program.

Could someone write this program for me?

I am using the book "Problem Solving, Abstraction, and Design using C++" of Friedman and Koffman (Addison-Wesley).  


Here's the assignment:

Develop a class where the following data is kept:

      * name student
      * street
      * zipcode
      * city
      * course (number, title, number of hours)                                    ; the number of courses is not known in                         advance

Next seperate member functions must be used:

      * input of the personal data
      * addition of a course; courses must be                                           kept in a binary tree
                * retrieve all data; courses must be shown in the                             sequence of their course number

If you have any questions, suggestions or remarks, don't hesitate to email me.

Thanks a lot!
Tom

tom.cornelis@glo.be




0
Comment
Question by:student040597
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 

Author Comment

by:student040597
ID: 1162586
Edited text of question
0
 

Accepted Solution

by:
reyelts earned 510 total points
ID: 1162587
Something like this:

  public class CPERSONAL {
    private:
     char name[ 100 ];
     char  street[ 100 ];
     char  zipcode[ 100 ];
     char  city[ 100 ];
    public:
      void setName( char* Name );
      void setStreet( char* Street );
      void setzipcode( char* ZipCode );
      void setCity( char* City );
}

  public class CCOURSE {
    int iNumber;
    int iHours;
   char sTitle[ 100 ];
   CCOURSE* NextCourse;
   CCOURSE *PreviousCourse;
   
   public:
     void setNumber( int iNum );
     void setHours( int iHour );
     void setTitle( char* sTitle );
  }


  public class CSTUDENT {
   
    public:
      CPERSONAL  Data;
      CCOURSE*     CourseList;
   
   private:
     CCOURSE* newCourse();
  }    
 
0
 

Author Comment

by:student040597
ID: 1162588
Could you please work out the program more in detail or give me some explanation about the suggested program?  I've been searching in my text-book, but I couldn't find the appropriate answers.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question