Sample File of Computer Project

Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

VANSHIKA’S

COMPUTER
PROJECT
FILE
TOPIC:-
BLUEJ PROGRAMS
ACKNOWLEDGEMENT
I feel pleasure to present this computer
project. This project was never been
possible without the help of various
sources. I am extremely thankful to my
computer teacher Ms. Jaiti because
without her support this project was
never possible. I also want to thank my
Parents for their help throughout the
project.

Thank You
1 .Write a program to display number of
digits and sum of digit of the number
using function void number (int) that
calculates sum of digit and display
number.
2. Design a class name ShowRoom with the
following description :
Instance variables/ Data members :
String name – To store the name of the customer.
long mobno – To store the mobile number of the
customer.
double cost – To store the cost of the items
purchased.
double amount – To store the amount to be paid
after discount.
double dis – To store the discount amount

Member methods: –

ShowRoom() – default constructor to initialize


data members.
void input() – To input customer name, mobile
number, cost.
void calculate() – To calculate discount on the cost
purchased items, based on following criteria of.

.
Cost Discount
(in percentage)

Less than or equal 5%


to ₹ 10000

More than ₹ 10000 10%


and less than or
equal
to ₹ 20000

More than ₹ 20000 15%


and less than or
equal
to ₹ 35000

More than ₹ 35000 20%


3

.
6. A tech number has even number of
digits. If the number is split in two equal
halves, then the square of sum of these
halves is equal to the number itself. Write
a program to generate and print all four
digit tech numbers.
9)Design a class to overload a function num_calc() as

follows:

(a) void num_calc (int num, char ch) with one integer

argument and one character argument, computes the


square of integer argument if choice ch is ‘s’ otherwise
finds its cube.

(b) void num_calc (int a, int b, char ch) with two integer
arguments and one character argument. It computes
the product of integer arguments if ch is ‘p’ else adds the
integers.

(c) void num_calc (String s1, String s2) with two string

arguments, which prints whether the strings are equal

or not.
Thank you!!!
Submitted by:-
Name- vanshika
Class- x-a
R.n.-26

Submitted to:-
Ms.jaiti (computer teacher)

You might also like