0% found this document useful (0 votes)
57 views2 pages

Do All The Programs On BLUEJ.: Data Members Purpose

The document outlines 10 programming problems to be completed as a computer project. The problems cover topics like string manipulation, classes, arrays, sorting, and searching. Object-oriented concepts like overloading and nested methods are also included. Students must complete all 10 problems and submit their work by the specified due date.

Uploaded by

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

Do All The Programs On BLUEJ.: Data Members Purpose

The document outlines 10 programming problems to be completed as a computer project. The problems cover topics like string manipulation, classes, arrays, sorting, and searching. Object-oriented concepts like overloading and nested methods are also included. Students must complete all 10 problems and submit their work by the specified due date.

Uploaded by

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

COMPUTER PROJECT WORK

CLASS X
2021-22
ISSUE DATE: 15/06/2021 REVIEW DATE: 15/10/2021 SUBMISSION DATE: 24/10/2021

NOTE: Do all the programs on BLUEJ.

P1 Write a program to input a sentence. Find and display the following:


(i) Number of words present in the sentence
(ii) Number of letters present in the sentence
Assume that the sentence has neither include any digit nor a special character.
P2 Design a class to enter a string and print the string in reverse order by reversing its each word.
INPUT STRING: COMPUTER IS AN INTERESTING SUBJECT
OUTPUT STRING: TCEJBUS GNITSERETNI NA SI RETUPMOC

P3 Write a program in Java to enter a sentence. Frame a word by joining all the first characters of
each word of the sentence. Display the word.
Sample Input: INDIAN SCHOOL CERTIFICATE EXAMINATION
Sample Output: ICSE
P4 Design a class to overload a function num_calc() as follows:
void num_calc(int num, char ch) with one integer argument and one char argument, computes the
square of integer argument if choice ch is 's' otherwise find its cube.
void num_calc(int a, int b, char ch) with two integer arguments and character argument. It
computes the product of integer arguments if ch is 'p' else adds the integers.
void num_calc(String s1, String s2) with two string arguments, which prints whether the strings are
equal or not
P5 Design a class to overload a function series() as follows:

P6 Define a class named FruitJuice with the following description:

Data Members Purpose

int product_code stores the product code number


String flavour stores the flavour of the juice (e.g., orange, apple, etc.)
String pack_type stores the type of packaging (e.g., tera-pack, PET bottle, etc.)
int pack_size stores package size (e.g., 200 mL, 400 mL, etc.)
int product_price stores the price of the product

Member Methods Purpose

FruitJuice() constructor to initialize integer data members to 0 and string data


members to ""
void input() to input and store the product code, flavour, pack type, pack size and
product price
void discount() to reduce the product price by 10
void display() to display the product code, flavour, pack type, pack size and product price

P7 Define a class called Student to check whether a student is eligible for taking admission in class XI
with the following specifications:
Data Members Purpose

String name to store name


int mm to store marks secured in Maths int
scm to store marks secured in Science
double comp to store marks secured in Computer

Member Methods Purpose

Student( ) parameterised constructor to initialize the data members by accepting


the details of a student
check( ) to check the eligibility for course based on the table given below
void display() to print the eligibility by using check() function in nested form

Marks Eligibility

90% or more in all the subjects Science with Computer


Average marks 90% or more Bio-Science
Average marks 80% or more and less than 90% Science with Hindi

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

P8 Write a program in to input and store all roll numbers, names and marks in 3 subjects of n number
of students in five single dimensional arrays and display the remark based on average marks as
given below
Average marks = total marks/3
Average marks Remark
85 – 100 EXCELLENT
75 – 84 DISTINCTION
60 – 74 FIRST CLASS
40 – 59 PASS
Less than 40 POOR

P9 Write a program to accept the year of graduation from school as an integer value from the user.
Using the Binary Search technique on the sorted array of integers given below, output the message
‘Record exists’ if the value input is located in the array. If not, output the message Record does not
exist”. (1982, 1987, 1993. 1996, 1999, 2003, 2006, 2007, 2009, 2010)
P 10 Write a program to input and sort the weight of ten people. Sort and display them in
descending order using the Bubble sort technique.

---------------------------------------------------------END OF PROJECT---------------------------------------------------------

You might also like