Solved

Could you solve my assignment?

Posted on 1997-04-05
3
210 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
  • 2
3 Comments
 

Author Comment

by:student040597
ID: 1162586
Edited text of question
0
 

Accepted Solution

by:
reyelts earned 170 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

816 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now