Trending ▼   ResFinder  

ICSE Class X Notes 2022 : Computer Science (Maneckji Cooper Education Trust School, Mumbai) : Very imp

4 pages, 12 questions, 0 questions with responses, 0 total responses,    0    0
Himadri Das
  
+Fave Message
 Home > lord17289 >   F Also featured on: School Page

Formatting page ...

Computer Assignment List Assignment no. Assignment Questions 1. Write a program to check if a given number is Palindrome. 2. Define a class employee having the following description: Instance Variable: Int pan - to store pan no. String name - to store name Double tax_income - to store taxable income Double tax - to store calculated tax Member functions: input() - store pan no, name, taxable calc() - calculate tax for employee display() - output details of employee Write a program to compute tax according to given conditions Upto 1,00,000 - No tax From 1,00,001 to 1,50,000 - 10% of income exceeding 1,00,000 From 1,50,001 to 2,50,000 - 5000 + 20% of income exceeding 1,50,000 Above 2,50,000 - 25000 + 30% of income exceeding 2,50,000 3 Define a class called Mobike with the following description: Instance Variables/Data Members: bno : to store the bike s number phno : to store the phone number of the customer name : to store the name of the customer days : to store the number of days the bike is taken on rent 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 Mobike is charged on the following basis. First five days : 500 per day Next five days : 400 per day Rest of the days : 200 per day void display : to display the details in the following format: Bike No. _______ 4 Phone No. __________ Name _______ No. Of Days Charge ____________ ________ Write a program with the following description: Class name: Student Data Members: name : to store the name of a student hindi : To store the marks in hindi subject english : To store the marks in english subject maths : To store the marks in maths subject computer : To store the marks in computer subject average : To store the average of the marks obtained grade : To store the grade depending upon the average Member Methods: void accept() : To accept name and marks in 4 subjects void calcavg() : To calculate and store the grade according to the following slabs: Average Marks 90 and above Between 75 to 89 (both inclusive) Between 60 to 75 (both inclusive) Less than 60 5 Grade Obtained A++ A B C Define a class called FruitJuice with the following description: Instance Variable/Data Members: int product_code - stores the product code number String flavour - stores flavour of the juice (orange, apple, etc) String pack_type - stores the type of packaging (tetra-pack, bottle, etc) int product_price - stores the price of the product Member Methods: void input() - to input and store the product code, flavour, pack type, pack size and product price void discount() - to reduce the product code by 10 void display() - to display the product code, flavor, pack type, pack size and product price Write the main method to create an object of the class and call the above member methods. 6 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 and display and fine charged at the rate of Rs. 2 per day. void display() - To display the details in the following 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. 7 Design a class to overload a function volume() as follows: (i) double volume (double r) - with radius r as an argument, returns 3 the volume of sphere using the formula: v = 4/3 x 22/7 x (ii) double volume (double h, double r) - with height h and radius r as the arguments, double volume of a cylinder using the formula: 2 v = 22/7 x x h (iii) double volume (double l, double b, double h) - with length l , breadth b and height h as the arguments, returns the volume of a cuboid using the formula: v = l x b x h 8 Design a class to overload a function area() as follows: (i) double area (double a, double b, double c) with three double arguments, returns the area of a scalene triangle using the formula: area = (s(s - a)(s - b)(s - c)) where s = (a + b + c)/2 (ii) double area (int a, int b, int height) with three arguments, returns the area of a trapezium using the formula: area = x height x (a+b) (iii) double area (double diagonal1, double diagonal2) with two double arguments, returns the area of a rhombus using the formula: area = x (diagonal1 x diagonal2)

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

© 2010 - 2025 ResPaper. Terms of ServiceContact Us Advertise with us

 

lord17289 chat