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

Std 10 Computer Application Assignment Questions for Project

The document outlines a series of programming assignments for students in a Computer Applications project, focusing on class definitions in Java. It includes specifications for four classes: Mobike, Library, Employee, and Discount, detailing their instance variables, member methods, and calculations for rental charges, fines, taxes, and discounts. Each assignment requires the creation of a main method to instantiate the classes and invoke the defined methods, along with a variable description table for each program.

Uploaded by

kamalnandi054
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)
4 views2 pages

Std 10 Computer Application Assignment Questions for Project

The document outlines a series of programming assignments for students in a Computer Applications project, focusing on class definitions in Java. It includes specifications for four classes: Mobike, Library, Employee, and Discount, detailing their instance variables, member methods, and calculations for rental charges, fines, taxes, and discounts. Each assignment requires the creation of a main method to instantiate the classes and invoke the defined methods, along with a variable description table for each program.

Uploaded by

kamalnandi054
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

Dear Students!

Kindly write the following programs in your assignment file as a part of Project in Computer Applications:

Chapter - Class as the basis of all computation


(Note: Chapter is already taught)
1. Define a class called Mobike with the following description:
Instance variables/Data members:
int bno – to stores the bike’s number.
int phno – to stores the phone number of the customer
String name – to stores the name of the customer
int days – to stores the number of days the bike is taken on rent
int charge – to calculate and store the rental charge
Member methods:
 void input( ) – to input and store the detail of the customer.
 void compute( ) – to compute the rental charge
The rent for a bike is charged on the following basis.
First five days Rs. 500 per day.
Next five days Rs. 400 per day.
Rest of the days Rs. 200 per day.
 void display( ) – to display the details in the following format:
Bike No. Phone No. Name No. of days Charge
———— ————— ——–——— —–——— ————

2. Define a class called Library with the following description :


Instance variables/data members:
int acc_num — stores the accession number of the book
String title — stores the title of the book
String author — stores the name of the author
Member methods:
 void input ( ) — To input and store the accession number, title and author.
 void compute ( ) — To accept the number of days late, calculate the display the fine charged at the rate of
Rs. 2 per day.
 void display( ) — To display the details in the following format:
Accession Number Title Author

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

3. Define a class Employee having the following description:


Instance Variables / Data Members:
int pan : To store personal account number
String name : To store name
double taxincome : To store annual taxable income
double tax : To store tax that is calculated
Member Methods:
void input() : Store the pan number, name, taxable income
void cal() : Calculate tax on taxable income
Calculate tax based on the given conditions
Total Annual Taxable Income Tax Rate
Up to Rs. 2,50,000 No tax
From Rs.2,50,001 to Rs.5,00,000 10% of the income exceeding Rs.2,50,000
From Rs.5,00,001 to Rs.10,00,000 Rs.30,000 + 20% of the income exceeding Rs.5,00,000
Above Rs.10,00,000 Rs.50,000 + 30% of the income exceeding Rs.10,00,000
void display() : Output details of an employee in the following format
Output:
Pan Number Name Tax-Income Tax
…….............. ……............ ………......... ……....
4. Define a class Discount having the following description:
Data Members/instance variables: int cost : to store the price of an article
String name : to store the customer’s name
double dc : to store the discount
double amt : to store the amount to be paid
Member functions:
void input() : Stores the cost of the article and name of the customer
void cal() : Calculates the discount and amount to be paid
void display() : Displays the name of the customer, cost, discount and amount to be paid
Write a program to compute the discount according to the given conditions and display the output as per the given
format:
List Price Rate of discount
Up to Rs. 5,000 No discount
From Rs. 5,001 to Rs. 10,000 10% on the list price
From Rs. 10,001 to Rs. 15,000 15% on the list price
Above 15,000 20% on the list price
Output: Name of the customer Discount Amount to be paid
--------------------------- --------------------------- ---------------------------
--------------------------- --------------------------- ---------------------------
--------------------------- --------------------------- ---------------------------

Note:
Variable Description Table has to be made for each program.

Format of Variable Description Table:

Name of the Variable Data Type Purpose/description

You might also like