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

Project of Computer Science For Class XII First Selection (2024 - 2025)

Project of physics

Uploaded by

ono15397
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views

Project of Computer Science For Class XII First Selection (2024 - 2025)

Project of physics

Uploaded by

ono15397
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Maria's Day School, Howrah

Submission of First Selection Assignment / Project Work for Class XII ( ISC )
2024 - 2025
Computer Science (Practical Files / Assignments / Projects Work)

Project 12.

Design a class Change to perform string related operations. The details of the class are
given below:

Class name: Change

Data Members/instance variables:

str: stores the word

newstr: stores the changed word

len: store the length of the word

Member functions:

Change(): default constructor

void inputword( ): to accept a word

char caseconvert (char ch): converts the case of the character and returns it

void recchange (int): extracts characters using recursive technique and changes its
case using caseconvert () and forms a new word

void display (): displays both the words

Specify the class Change, giving details of the Constructor ( ), and member functions
void inputword (), char caseconvert (char ch), void recchange (int) and void display ().
Define the main () function to create an object and call the functions accordingly to
enable the above change in the given word.

Project 13.

Input a paragraph containing ‘n’ number of sentences where (1 = < n < 4). The words
are to be separated with a single blank space and are in UPPERCASE. A sentence may
be terminated either with a full stop ‘.’ Or a question mark ‘?’ only. Any other character
may be ignored. Perform the following operations:
(i) Accept the number of sentences. If the number of sentences exceeds the limit, an
appropriate error message must be displayed.

(ii) Find the number of words in the whole paragraph

(iii) Display the words in ascending order of their frequency. Words with same frequency
may appear in any order.

Example 1

INPUT: Enter number of sentences.

Enter sentences.

TO BE OR NOT TO BE.

OUTPUT:

Total number of words: 6

WORD FREQUENCY

OR 1

NOT 1

TO 2

BE 2

Example 2

INPUT: Enter number of sentences

Enter sentences.

THIS IS A STRING PROGRAM.IS THIS EASY?YES,IT IS.

OUTPUT:

Total number of words: 11

WORD FREQUENCY

A 1
STRING 1

PROGRAM 1

EASY 1

YES 1

IT 1

THIS 2

IS 3

Example 3

INPUT : Enter number of sentences

OUTPUT:

INVALID ENTRY

Project 14.

A palindrome is a word that may be read the same way in either direction. Accept
a sentence in UPPER CASE which is terminated by either “.”, “?”, or “!”. Each
word of the sentence is separated by a single blank space.
Perform the following tasks:
a) Display the count of palindromic words in the sentence.
b) Display the palindromic words in the sentence.

Example of palindromic words:

MADAM, ARORA, NOON

Test your program with the sample data and some random data:

Example 1
INPUT : MOM AND DAD ARE COMING AT NOON.

OUTPUT : MOM DAD NOON

NUMBER OF PALINDROMIC WORDS : 3

Example 2

INPUT : HOW ARE YOU?

OUTPUT : NO PALINDROMIC WORDS

Project 15.

Write a program to declare a square matrix A[][] of order (M X M) where ‘M’ is


the number of rows and the number of columns such that M must be greater than 2
and less than 20. Allow the user to input integers into this matrix. Display
appropriate error message for an invalid input. Perform the following tasks:

a) Display the input matrix.


b) Create a mirror image of the inputted matrix.
c) Display the mirror image matrix.

Test your program for the following data and some random data:

Example 1

INPUT : M = 3

4 16 12

8 2 14

6 1 3

OUTPUT :

ORIGINAL MATRIX

4 16 12

8 2 14
6 1 3

MIRROR IMAGE MATRIX

12 16 4

14 2 8

3 1 6

Example 2

INPUT : M = 22

OUTPUT : SIZE OUT OF RANGE

You might also like