Solved

Could you solve my assignment?

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Building cUrl in Windows v7.43.0 4 39
C++ assignment question 7 268
Create a path if not exists 7 108
Gaming Software 1 30
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

733 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