Please, please don't tell me to stop being lazy and do this myself. I'm really struggling in my java class and I wouldn't be online asking strangers for help if I wasn't desperate and didn't already try to do the work myself. I've been on a number of programming help forums only to be told to get out and stop being lazy, but there's a reason I got such a low grade in programming the first semester, and that's because I don't get it, and every time I ask for help I get turned down. So though I'm aware you are busy people with lives, I only ask that you take the time out this once to help me with this java code or give a detailed explanation of how to arrive at the correct answer for my test tomorrow, so that I don't fail, as I still have to study and do loads of other homework.

There are three separate problems, and I'm supposed to use looping structures to solve each one of them. If you want to see my attempts at them I'll gladly post them if it's needed, though I'm sure they're not even close to correct. I've only gotten 1 out of the 4 parts of the assignment done and completely correct and the test is tomorrow.

2) The population of Mexico in 1990 was 89.2 million. Write code that prints the year (starting with 1991) and the expected population that year, assuming a constant growth rate of 2.3% per year. The last year printed, should be the first year Mexico's population exceeds 120 million.

3) Complete the method myGPA. This method has one String argument that contains the letter grades for a teacher's class. Using the scale below, this method should determine and return the GPA of these letter grades.

A= 4, B = 3, C = 2, D = 1, F = 0

You may assume the String variable grades looks something like this:

Remember, each time myGPA is called, the String variable grades will probably have a different length.

4) Complete the method myFactors. This method should determine and print to the console window, all factors of each integer from 20 to 50. The output should look like this:

Number Factors
----- -------
30 1, 2, 3, 5, 6, 10, 15, 30
31 1, 31
32 1, 2, 4, 8, 16, 32
.
.
.
50 1, 2, 5, 10, 25, 50

Post what you've got for the first part. Then explain why you are stuck at that point. Otherwize we will have no idea what it is you need to know.

you 're not being turned down.
we're willing to help you correct your code, but if you don't show us your code, we can't see where you are going wrong, that's all.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.