Solved

Could you solve my assignment?

Posted on 1997-04-05
3
192 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

760 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

22 Experts available now in Live!

Get 1:1 Help Now