1. Define a class student with the following specification
    Private members of class student
    admno                        integer
    sname                        20 character
    math, science       float
    total                            float
    ctotal()                        a function to calculate eng + math + science with float return type.
    Public member function of class student
    Takedata()                   Function to accept values for admno, sname, eng, science and invoke ctotal() to                                    calculate total.
    Showdata()                   Function to display all the data members on the screen.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s