hi guy need help with 2 programm please help

hi,
i m new at this
i got a assignment to submit with 2 questions
and i don't know how to start or do it can u please help me!
here are the questions
1)Design and implement a class Circular List. Write C++ program that splits a circular linked list into two separate linked lists. Each node in circular linked list should have two fields :- (i) Data field having integer value. (ii)Pointer field having to net node.


Q.2 - A university has two types of students : hosteler and day-scholars. The Hostelers stay in a hostel but pay hostel rent along with the fee, the da-scholars only pay the fee. The student may register for one programme. The fee of one programme is different from others.Design and implement suitable class hierarchies for student class.Write necessary constructs and write the polymorphic function for printing the total payment due for a student.Write appropriate function for the above design.

Thanks a lot in advance :D :D
Hi visorvice,

Have you done a basic design , by writing comments that are a methodology, then writing code to do what's in the comments.

This helps organise your thoughts logically.

Hmm.Let's See.I Don't know classes,But I Could Help You OUt With Q.2 Q.2 - A university has two types of students : hosteler and day-scholars. The Hostelers stay in a hostel but pay hostel rent along with the fee, the da-scholars only pay the fee. The student may register for one programme. The fee of one programme is different from others.Design and implement suitable class hierarchies for student class.Write necessary constructs and write the polymorphic function for printing the total payment due for a student.Write appropriate function for the above design.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <iostream>
using namespace std;
int main()
int which;
int hotelnights;
cout <<"Write 'H' For Hosteler and 'D' For Day-Scholar\n";
cin >>which;
if (which == "H")
cout <<"I Hope Your Enjoing Your Stay!How Many Nights Did You Stay?\n";
cin >>hotelprice;
cout <<hotelnights*130+hotelnights*130*0.1;
cout <<" Is Your Total Price (Tax Included)+Free Room Service And Food\n";
}
elseif (which =="D")
{
cout <<"Good.Fee Is 100 Bucks.";
}
else
{
cout <<"YOUR IN HIGHSCHOOL!YOU SHOULD KNOW TO TYPE IN 'H'OR'D'";
//That is if You dont Use H or D.LOL
}
return 0;

@visorvice - If it's an assignment then you'll need to have a go at it before you'll get decent help around here. Most people tend not to provide solutions to homework problems.

@Techy24 - That's not the answer to Q2. It's essentially asking for a design for the student hierarchy using inheritance and polymorphism. Also, there's a could of syntax errors in your code example too. ;-)
so have you started coding it?
Topic archived. No new replies allowed.