ICSE Computer Project, 2011

 

PROJECT WORK

ICSE COMPUTER APPLICATIONS

2011 – 12

 ———————————————————————————————————————————————————————-

Rules & Regulations

  •      Programs are to be written in Java with Blue-J as the environment.
  •      You are expected to submit the complete project work (incomplete work will be marked ZERO).
  •      You need to furnish the following as your project contents…
  1. Cover Page
  2. The Program Code
  3. 2 sets of sample input and output
  4. Variable Description for each program
  •      All projects must be printed in B/W or colored printouts.
  •      Avoid usage of unwanted illustrations and decorations.
  •      The front page must contain your name, class, section and roll number, along with index no. if you receive the number before the project submission date.
  •      All the pages must be numbered.
  •      You are supposed to submit your work in white Transparent Channel Files.
  •      Date of submission on or before 30th November 2011.

———————————————————————————————————————————————————————-

PROJECT QUESTIONS

5 Programs on Sequential Structure

  1. WAP to swap the values stored in two variables (using a third variable)
  2. WAP to swap the values stored in two variables (without using a third variable)
  3. Find out the total equivalent resistance in a circuit in which the 2 resistors are connected in parallel and series
  1. Parallel = (R1*R2) / (R1+R2)
  2. Series = R1 + R2
  • WAP to input the total amount in Rupees and find out the denominations in least possible numbers of all possible currency notes (i.e. Rs. 1000/- , Rs. 500/- , Rs. 100/- , Rs. 50/- , Rs. 20/- , Rs. 10/- , Rs. 5/- , Rs. 2/- , Rs. 1/-  for the amount entered by the user.
  • WAP to input the Principal Rate and Time and calculate the Compound Interest on the amount.
  • ———————————————————————————————————————————————————————-

    5 Programs on Selection Structure

    1. WAP to input three nos. and print the 1st largest, 2nd largest and the 3rd largest of them do not use arrays and sorting.
    1. WAP to enter the co-efficient of Quadratic Equation ax2+bx+c=0 and find out the roots, Roots of a Quadratic Equation and mention whether the Roots are Real, Equal or Imaginary
    1. JSEB charges their consumer according to the tariff chart given below,

    Units Consumed                           Charges

    • Up to 50 units                               Free
    • 51 – 100                                        0.75p
    • 101 – 250                                      1.25p
    • 252 – 500                                      2.50p
    • Above 500                                   3.00p

    WAP in java to input the units consumed and display the electricity bill calculated as per following. A surcharge of Rs. 75.00 is levied if the units consumed exceeds 250. A fixed rental of Rs. 180.00 is charged to all the consumers. Over an above a Service Tax of 12 ½ % is add-on to the above and an Edu. Cess of 2% on the Service Tax is charges as extra. Calculate the Bill amount if on the whole a rebate (discount) of 4% is allowed.

    1. A cab driver charges Rs. 15.00 on the first meter (km). he charges an extra of Rs. 22.00 on the next 5 kms. Anything beyond that is charged at Rs. 2.50 per km. WAP to input the distance covered and calculate the cab charges.
    1. Write a menu driven program to input/assign/store 2 numbers and perform the following mathematical operations on the two variables as given below in the menu…
    1. Addition (+)
    2. Subtraction (-)
    3. Multiplication (x)
    4. Division (/)
    5. Modulus (%)
    6. Power (xy)

    ———————————————————————————————————————————————————————-

    10 Programs on Iterative Structure (on Numbers)

    1. Input any number and check if it is a Special (Krishnamurthy) number or not. (Hint: 145 = 1! + 4! + 5!)
    1. Input any number and check if it is an Armstrong (Narcissistic) number or not.  (Hint: 153  = 13 + 53 + 33)
    1. Input any number and check if it is a Perfect number or not. (Hint: 6 = 1 + 2 + 3, sum of factors excluding itself)
    1. Input any number and check if it is a Palindrome or not. (Hint: 121 = 121)
    1. WAP to input two numbers and print the HCF (GCD) and LCM of the two numbers.
    1. WAP to check whether a number entered by the user is a Automorphicnumber. E.g. 25 is an Automorphic number because 252 = 625 in which the number of digits in the original number (i.e. 25) before squaring is identical to that many number of digits from the LHS of the squared number (i.e. 625).
    1. WAP to check whether a number entered by the user is an Evil number or not. An Evil number is one whose Binary counterpart has even number of ones. E.g. 10, as the binary of 10 is 1010 which has 2 ones (hence Evil), whereas numbers that has Odd number of 1’s are called Odious numbers
    1. WAP to generate the Tribonacci Series. E.g. 0, 1, 1, 2, 4, 7, 13… A Tribonacci series is one whose every 4th term is the sum of 1st, 2nd and 3rd terms.
    1. WAP to check whether two numbers entered by the user belong to the set of Amicable Pair or not. Two numbers are said to be Amicable Pair if the sum of factors of the 1st excluding the number is equal to the 2nd number and the sum of factors of the 2nd number excluding itself is equal to the 1st  E.g. 220 and 284
    1. Write a program to check whether the number entered by the user is a UNIQUE INTEGER or not. A UNIQUE INTEGER is one that has no repetition of digits. i.e. all the digits are distinct and appears only once. For e.g. 1234, 65234 etc… whereas digits like 1000, 65536, 121 are not.

    ———————————————————————————————————————————————————————-

    5 Programs on Single Dimensional Arrays

    1. Input 10 nos. in an array and search a given number from within that array using Linear Search technique, and display whether found or not along with its position.
    1. Input 10 nos. in an array and search a given number from within that array using Binary Search technique.
    1. Sort an array of 10 elements in Ascending / Descending Order using Bubble Sort technique.
    1. Sort an array of 10 elements in Ascending / Descending Order using Selection Sort technique.
    1. Store 5 nos. in array A[ ] and 5 nos. in array B[ ] and merge them into array C [ ]

    ———————————————————————————————————————————————————————-

    5 Programs on Functions

    1. Create overloaded methods named void calc_volume ( ), that has been overloaded to perform the following functions
    • Volume of Sphere
    • Volume of Cylinder
    • Volume of Cone

    Write a menu driven program in Java to display the above 3 menus and execute the overloaded methods and display the volume in the respective functions,

    • calc_volume (double) for sphere,
    • calc_volume (double, double) for cylinder and
    • calc_volume (float, float) for cone.
    1.  Write a program to create a class which will have the following functions:

    int NumFun()                   : to create a single dimensional array of size 50 integers and                                                                                 return the smallest  integer

    int NumFun(int)              : to calculate and return sum of factors, excluding the number, of                                                                    the number returned by the above function

    int NumFun(int, int)     : to check whether the two results returned by the above functions                                                                are same or not and accordingly display “perfect” or “non-perfect”

    void main()                      :  to execute all the above functions accordingly, using the concept                                                                  of function overloading.

    1. Define a class with the following specifications:

    int Armstr(int)             : to check a number and return 1 if the number is Armstrong otherwise                                                        return 0.

    void prime(int, int )     : to display all prime numbers within the range entered by the user.

    void main                    : to input number and display the message depending upon the value                                                          returned by Armstr(int) and to input range required for prime(int, int).

    1.  A class Myseries is declared to find the sum of the following series

    sum = 1*y2/1!  +  2*y4/2!  +  3*y6/3!  +  4*y8/4! … till 10 terms

    Data members

    int        y                        :         integer number

    long     sum                   :         integer to store sum

                                                   

    Member Functions

    void getnum( )                         :          to accept the integer ‘y’

    void getseries( )                      :          to find the sum of elements of the series

    long getpower(int, int)        :          to calculate ‘y’ to the power ‘x’

    long getfact(int)                     :          to calculate the factorial of the denominator

    void display( )                        :          to display finally the sum of the series

    1.  Write a function named int sort_digit (int) in Java to pass an integer number as argument that might contain any number of digits, and sort each individual digits of the number in ascending order and return the same, (without implementing arrays).

    e.g                   Sample Input:             4987

    Sample Output:           4789

    Sample Input:             1205

    Sample Output:           0125

    ———————————————————————————————————————————————————————-

    10 Programs on Strings

    1. Input a sentence and display the total no. of letters, digits, uppercase letters, lowercase letters, spaces, special characters, vowels and consonants are present in it.
    1. Input the complete name of a person and display the initials, e.g. Mohandas Karamchand Gandhi as MKG
    1. Input a sentence and reverse each word without reversing the sequence of the words. E.g. COMPUTER IS FUN, as RETUPMOC SI NUF
    1. Input a sentence and convert each word into a Piglatin. E.g. COMPUTER IS FUN becomes OMPUTERCAY ISAY UNFAY
    1. Input a sentence and display only the Palindrome words, like NITIN ARORA PLAYS FOOTBALL, gives NITIN, ARORA
    1. Input names of ten capital cities and arrange them in Lexicographic order and redisplay them.
    1. Input a sentence in any random case and capitalize the first and last letter of each word and convert the rest to lower case
    1. Input a word and generate the following pattern

    Input: MATHS

    Output:

    M

    MA

    MAT

    MATH

    MATHS

    1. Write a program in Java to accept a line of text from the user and create a new word formed out of the first letter of each word. After creating the new word reverse it and check whether it is a Palindrome or not.

    E.g. If the user enters:  Mangoes Are Delivered After Midnight

    Output: MADAM

    Reverse: MADAM

    Yes, it is a Palindrome

    E.g. If the user enters: A Brick In The Wall

    Output: ABITW

    Reverse: WTIBA

    No, it is not a Palindrome

    1.  Input a string along with an encoding factor and write a cryptography program code to encrypt the data. E.g. Input word is “APPLE” and Encoding factor is 3 then each letter gets encoded by a factor of 3 by adding it to its ASCII equivalent resulting in “DSSOH”

    *************

    Comments
    1. Kamil Akhter says:

      category Sequential Structure :
      prog no 3….
      is that a menu-driven prog..???

    2. Shivanand Shetti says:

      A cab driver charges Rs. 15.00 on the first meter (km). he charges an extra of Rs. 22.00 on the next 5 kms. Anything beyond that is charged at Rs. 2.50 per km. WAP to input the distance covered and calculate the cab charges.

      isme if user input 2 kms then shoul the output be (15+22) or will it be ist km ka 15 and the another 1 km ke hisab se (15+(22/5))

    3. Kamil Akhter says:

      category Sequential Structure :
      prog no 3….
      is that a menu-driven prog..???

    4. Iterative 6th Question
      is it 25^5 because 252=625 does’nt make sense and also is it RHS in place of LHS

      • Kamil Akhter says:

        @shivanand
        Automorphic nos.: If the square of the number contains the number as the last digits.
        for example, 25 is an automorphic no. as its square is 625 and 25 is present as the last two digits.

    5. amul bhatia says:

      progs on string Qno-6 what is lexicographic order

    6. Kamil Akhter says:

      Iterative Structure:
      prog no 8.
      whats the limit of d series !!

    7. amul bhatia says:

      in progs on arrays Qno. 5 what does merge mean????
      do we add the elements of a and b??

    8. Rishabh says:

      Sir, is there a chance of scoring a full marks in this project?? if all the programs work right, where can one lose marks??

    9. Shivanand Shetti says:

      Iterative Structure:
      prog no 8.
      whats the limit of d series !!

    10. Rishabh Mitra says:

      Is variable description now required ? (as of 12/11/2011 21:20 IST)

    11. Udit Bagchi says:

      tribonacci series….facing problems please help!!!

    12. Mahadev says:

      please tell me how to print the different combinations of a 3 digit no. in java….

    13. Q. A teacher wants to keep the names and their total marks obtained in the final examination of her class having 40 students. Write a program in Java to store all the names and the total marks in two different Single Dimensional Array & display all the names of the students according to the rank obtained in the final examination, keeping the 1st rank at the top and so on.

      • Neel says:

        import java.io.*;
        class Rank
        {
        public static void main() throws IOException
        {
        InputStreamReader x= new InputStreamReader(System.in);
        BufferedReader y= new BufferedReader(x);

        int marks[]=new int[40];
        String names[]=new String[40];
        int i,j,temp;
        String str;

        System.out.println(“Enter the names of the students and marks obtained for 40 in a class”);
        for(i=0;i<40;i++)
        {
        names[i]=y.readLine();
        marks[i]=Integer.parseInt(y.readLine());
        }

        for(i=0;i<40-1;i++) // bubble sort begins
        {
        for(j=0;jmarks[j+1])
        {
        temp=marks[j]; //swapping marks
        marks[j]=marks[j+1];
        marks[j+1]=temp;

        str=names[j]; //swapping names
        names[j]=names[j+1];
        names[j+1]=str;
        }
        }
        } //bubble sort ends

        System.out.println(“Rank \t\t Names \t\t Marks”);
        for(i=0;i<40;i++)
        {
        System.out.println((i+1)+"\t\t"+names[i]+"\t\t"+marks[i]);
        }

        }
        }

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s