0% found this document useful (0 votes)
33 views9 pages

Class 10 (24-25)

Uploaded by

krsujal66
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)
33 views9 pages

Class 10 (24-25)

Uploaded by

krsujal66
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/ 9

Computer Project

Question 1
Question 2

Question 3
Question 4
Question 5
Question 6

Question 7

Write a program to assign a full path and file name as given below. Using
library functions, extract and output the file path, file name and file
extension separately as shown.

Input C:\Users\admin\Pictures\flower.jpg

Output :-

Path:C:\Users\admin\Pictures

File name: flower

Extension: jpg

Question 8

Write a program to input a sentence and print the number of characters


found in the longest word of the given sentence.
For example, if S="India is my country" then the output should be 7

Question 9

Write a program to input a string in uppercase and print the frequency of


each character. [15]

Example: INPUT: COMPUTER HARDWARE

OUTPUT:

CHARACTERS FREQUENCY

A 2

C 1

D 1

E 2

H 1

M 1

O 1

P 1

R 3

T 1

U 1

W 1

Question 10

Write a program to input a sentence and two words. Rewrite the sentence by
replacing all the occurrence of first word by second word.

Example :

Sentence : The day of the week

First word : The

Second world: This

Output : This day of This week


Question 11

Write a program to initialize an array of 5 names and initialize another array


with their respective telephone numbers. Search for a name input by the
user, in the list. If found, display "Search Successful" and print the name
along with the telephone number, otherwise display "Search unsuccessful.
Name not enlisted".

Question 12

Define a class Student as given below:

Data members/instance variables:

name, age, m1, m2, m3 (marks in 3 subjects), maximum, average

Member methods:

1. A parameterized constructor to initialize the data members.

2. To accept the details of a student.

3. To compute the average and the maximum out of three marks.

4. To display the name, age, marks in three subjects, maximum and average.

Write a main method to create an object of a class and call the above
member methods.

Question 13

Write a program to input a word of 4 characters and make all the possible
combination of the characters without repetition of the characters.(Jumbled
word)

Question 14

Write a program to input two words in uppercase and check whether they
are Anagram words are not.

[Hint :words of same length and having same characters but in different
positions. ]

Eg. BCA & CAB]

Question 15
Write a program that encodes a word into Piglatin. To translate word into
Piglatin word, convert the word into uppercase and then place the first vowel
of the original word as the start of the new word along with the remaining
alphabets. The alphabets present before the vowel being shifted towards the
end followed by "AY".

The word without any vowel will be remain unchained.

Sample Input 1: London

Output: ONDONLAY

Sample Input 2: Olympics

Output: OLYMPICSAY

Sample Input 3 : SKY

Output: SKY

Question 16

Define a class named ParkingLot with the following description:

Instance variables/data members:

int vno - To store the vehicle number

int hours - To store the number of hours the vehicle is parked in the parking
lot

double bill - Tb store the bill amount

Member methods:

void input() - To input and store the vno and hours.

void calculate() - To compute the parking charge at the rate of Rs.3 for the
first hours or part thereof, and Rs. 1.50 for each additional hour or part
thereof.

void display () - To display the detail

Write a main method to create an object of the class and call the above
methods

Question 17

Define a class to accept the name of 10 students in an array and check for
the existence of the given name in the array using linear search, if found
print the position of the name, if not found print appropriate message. Also
bring the name which begins with “SRI”.

Question 18

Define the class to accepted string and print the same in reverse , also print
the number of vowels in the string.

Sample input: BEAUTIFUL

Sample output: LUFITUAEB

Number of vowels: 5

You might also like