☞ JAVA 1.1 To find the perimeter and area of a circle given a value of radius.
☞ JAVA 1.2 To find the largest among three numbers x, y, and z..
☞ JAVA 1.3 To calculate sum of all these numbers divisible by 3
☞ JAVA 1.4 To check whether the number is an Armstrong number or not.
☞ JAVA 1.5 Find the highest mark and average mark secured by him "s" number of subjects
☞ JAVA 2.1 to call the method print() of class Student
☞ JAVA 2.2 To call the method print() of class Student first and then call print() method of class School.
☞ JAVA 2.3 To call print() method of class Question by creating a method named ‘studentMethod()
☞ JAVA 2.4 To call default constructor first and then any other constructor in the class Answer
☞ JAVA 2.5 To debug the program which is intended to print 'NAGARAJU
☞ Write a program that prompts the user to enter the number of students and each student’s name and score, and finally displays the student with the highest score and the student with the second-highest score. Use the next() method in the Scanner class to read a name rather than using the nextLine() method. Assume that the number of students is at least 2.
☞ Write a program that lets the user enter the loan amount and loan period in number of years
and displays the monthly and total payments for each interest rate starting from 5% to 8%, with an increment of 1/8.
☞Write a test program that prompts the user to enter a number and its width and displays a string returned by invoking format(number, width).
☞Write a method that finds the number of occurrences of a specified character in a string using the following header: public static int count(String str, char a)
☞Write a method that converts milliseconds to hours, minutes, and seconds using the following header: public static String convertMillis(long millis) The method returns a string as hours:minutes:seconds.
☞Write a method to compute the following series:
m(i) = 1/2 + 2/3 +......+ i/(i+1)
☞ Write a method that computes future investment value at a given interest rate for a specified number of years. The future investment is determined using the formula in Programming Exercise 2.21. Use the following method header: public static double futureInvestmentValue(double investmentAmount, double monthlyInterestRate, int years) For example, futureInvestmentValue(10000, 0.05/12, 5) returns 12833.59.
☞ISBN-13 is a new standard for identifying books. It uses 13 digits d1d2d3d4d5d6d7d8d9d10d11d12d13. The last digit d13 is a checksum, which is calculated from the other digits using the following formula:
10 - (d1 + 3d2 + d3 + 3d4 + d5 + 3d6 + d7 + 3d8 + d9 + 3d10 + d11 + 3d12) % 10
If the checksum is 10, replace it with 0. Your program should read the input as a string. Display “invalid input” if the input is incorrect.
☞Write a program that prompts the user to enter a string and displays the number of vowels and consonants in the string.
No comments:
Post a Comment