Graderpractice for programmers

254275 OOP - Lab1 Extra Sec 3 Fundamental 2/2563

Awaiting submission
Venus takes 224.70 Earth days to complete one orbit around the Sun (compared to Earth which takes 365.25 days). The program should input your age on Earth (integer) and output your age on Venus to 3 decimal places.

Hint: use String.format("%.3f", value) to convert a double to a String at 3 d.p.

Awaiting submission
Write a program that takes a planet name and outputs information about that planet. The program should accept input in any case (e.g. “Mars” == “mars” == “MARS”).

Hint Use .equalsIgnoreCase(" ")

ListName Of Planet








Awaiting submission
Read in a number Printout the factorial. (5!=5*4*3*2*1=120)
Awaiting submission
Write a program that inputs 1 integer and then draws a star using *

Hint: Use 2 loop

Awaiting submission
Write a Java program to check the Leap Year if a leaf years print true but no print false
Awaiting submission
The Dean would like students to help write a program to calculate the change. By calculating the minimum amount of coins for changing money Here we have 5 types of coins: 20, 10, 5, 2, and 1. The program will receive two values: the price of the item to be paid and the amount received. And display the result as the number of coins in the change of money according to the coin type

Hint Use Mod

Awaiting submission
Read in a string and an integer. Print out the x-th character of the string, where x is the integer from the user input. If the integer is greater than the length of the string then print “error".

Hint Use charAt

Awaiting submission
Write a program To count the number of characters (a, e, i, o, u)