Solved

Could you solve my assignment?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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…
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 goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

895 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

16 Experts available now in Live!

Get 1:1 Help Now