Ask Question

Each time Kevin re-reads his JAVA book (which happens every month), he learns 10% of whatever material he didn't know before. He needs to score at least 95% on the comprehensive exam to become a certified JAVA developer. When Kevin's started, he knew nothing about JAVA. Write a method that simulates Kevin's learning progress and returns the number of months it will take him to get ready for the exam. Write a main method that displays the result (in years and months).

+2
Answers (1)
  1. 19 June, 10:55
    0
    The java main method that can be used to display the number of years and months to get ready for the exam is explained below.

    Explanation:

    public class GetMonths {

    public static void main (String[] args) {

    int noofmonths = 0;

    int noofyears = 0;

    double percentnotknown = 100;

    double percentKnown = 0;

    while (percentKnown<95) {

    percentnotknown * = 0.9;

    percentKnown = 100 - percentnotknown;

    noofmonths++;

    if (noofmonths==12) {

    noofyears++;

    noofmonths = 0;

    } / / end if

    } / / end while

    System. out. println ("After "+noofyears+" years, "+noofmonths+" months,");

    System. out. println ("Percentage known = "+percentnotKnown);

    } / / end main ()

    } / / end class
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Each time Kevin re-reads his JAVA book (which happens every month), he learns 10% of whatever material he didn't know before. He needs to ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers