This folder contains all the task solutions to MyCaptain's Java Language workshop.
The tasks are -
-
Write a Java program to print the area and perimeter of a circle.
-
Write a Java program and compute the sum of the digits of an integer
-
Write a Java program that reads a number in inches, converts it to meters Note: one inch is 0.0254 meter.
-
Write a Java program to convert minutes into a number of years and days
Test data:
Input the number of minutes: 3456789
Expected output:
3456789 minutes is approximately 6 years and 210 days
-
Write a Java program that reads an integer and check whether it is negative, zero or positive
-
Write a Java method to count all vowels in a string
-
Write a Java method to find the smallest number among three numbers
-
Write a program in Java to display the cube of the number up to a given an integer.
Test data:
Input number of terms : 4
Expected output:
Number is : 1 and cube of 1 is : 1
Number is : 2 and cube of 2 is : 8
Number is : 3 and cube of 3 is : 27
Number is : 4 and cube of 4 is : 64
- Optional Project