0% found this document useful (0 votes)
102 views

Velammal Bodhi Campus, Theni: Computer Science

The document defines four C++ classes: 1. Applicant class with private data members for admission number, name, aggregate marks, and grade along with public member functions to enter data and display results. 2. Employee class with private data members for employee number, name, salary, and other fields along with public member functions to accept and display employee data. 3. Report class with private data members for admission number, name, marks array, and average along with public member functions to read student information and display it. 4. MyFolder class with private data members for an array of file names, available space, and used space along with public member functions to accept new files, return available space in KB,

Uploaded by

Aircc Airccse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views

Velammal Bodhi Campus, Theni: Computer Science

The document defines four C++ classes: 1. Applicant class with private data members for admission number, name, aggregate marks, and grade along with public member functions to enter data and display results. 2. Employee class with private data members for employee number, name, salary, and other fields along with public member functions to accept and display employee data. 3. Report class with private data members for admission number, name, marks array, and average along with public member functions to read student information and display it. 4. MyFolder class with private data members for an array of file names, available space, and used space along with public member functions to accept new files, return available space in KB,

Uploaded by

Aircc Airccse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

VELAMMAL BODHI CAMPUS, THENI

COMPUTER SCIENCE

1. Define a class Applicant in C++ with following description: 4X4=16


Private Members
1. A data member ANo ( Admission Number) of type long
2. A data member Name of type string
3. A data member Agg(Aggregate Marks) of type float
4. A data member Grade of type char
5. A member function GradeMe( ) to find the Grade as per the Aggregate Marks obtained by a student.
Equivalent Aggregate marks range and the respective Grades are shown as follows
Aggregate Marks Grade
> = 80 A
Less than 80 and > = 65 B
Less than 65 and > = 50 C
Less than 50 D
Public Members
1. A function Enter( ) to allow user to enter values for ANo, Name, Agg & call function GradeMe( ) to find
the Grade
2. A function Result ( ) to allow user to view the content of all the data members.
2. Define a class employee with the following specifications :
Private members of class employee
1. empno integer
2. ename 20 characters
3. basic, hra, da float
4. netpay float
5. calculate() A function to calculate basic + hra + da with float return type
Public member function of class employee
1. havedata() function to accept values for empno, sname, basic, hra, da and invoke calculate() to calculate netpay.
2. dispdata() function to display all the data members on the screen.

3. Define a class report with the following specification :


Private members :
1. adno 4 digit admission number
2. name 20 characters
3. marks an array of 5 floating point values
4. average average marks obtained
5. getavg() to compute the average obtained in five subjects
Public members :
1. readinfo() function to accept values for adno, name, marks, and invoke the function getavg().
2. displayinfo() function to display all data members on the screen you should give function definitions.

4. Declare a class myfolder with the following specification :

Private members of the class


1. Filenames – an array of strings of size[10][25]( to represent all the names of files inside myfolder)
2. Availspace – long ( to represent total number of bytes available in myfolder)
3. Usedspace – long ( to represent total number of bytes used in myfolder)

public members of the class


1. Newfileentry() – A function to accept values of Filenames, Availspace and Usedspace fromuser
2. Retavailspace() – A Fucntion that returns the value of total Kilobytes available ( 1 Kilobytes = 1024 bytes)
3. Showfiles() – a function that displays the names of all the files in myfolder.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy