272
Originally Posted by 3AFL S2K,Mar 5 2010, 10:04 AM
wats on your mind, Zeke?
hola 
just a little homework for your reading pleasure:
/*
* UMUC CMIS 141
* Project 2
* William Johnson
* This assignment includes a method that takes a variable 'year' passed
* by the main method, determines if the year is a leap year or not,
* then returns the appropriate number of days back to the main method
* where it is displayed in a loop of a range of years.
*/
public class Project2 {
public static int numberOfDaysInAYear(int year) {
int days;
// if it is divisible by 100
if (year % 100 == 0) {
// if it is divisible by 400
if (year % 400 == 0) {
// leap year
days = 366;
} else {
// not a leap year
days = 365;
}
// if it is divisible by 4
} else if (year % 4 == 0) {
// leap year
days = 366;
} else {
// not a leap year
days = 365;
}
// return number of days
return days;
}
public static void main(String[] args) {
for (int year = 2000; year <= 2010; year++) {
System.out.println("The year " + year + " has " + numberOfDaysInAYear(year) + " days in it.");
}
}
}

just a little homework for your reading pleasure:
/*
* UMUC CMIS 141
* Project 2
* William Johnson
* This assignment includes a method that takes a variable 'year' passed
* by the main method, determines if the year is a leap year or not,
* then returns the appropriate number of days back to the main method
* where it is displayed in a loop of a range of years.
*/
public class Project2 {
public static int numberOfDaysInAYear(int year) {
int days;
// if it is divisible by 100
if (year % 100 == 0) {
// if it is divisible by 400
if (year % 400 == 0) {
// leap year
days = 366;
} else {
// not a leap year
days = 365;
}
// if it is divisible by 4
} else if (year % 4 == 0) {
// leap year
days = 366;
} else {
// not a leap year
days = 365;
}
// return number of days
return days;
}
public static void main(String[] args) {
for (int year = 2000; year <= 2010; year++) {
System.out.println("The year " + year + " has " + numberOfDaysInAYear(year) + " days in it.");
}
}
}
Originally Posted by tacocat,Mar 5 2010, 10:05 AM
You sweetcakes. I am working on problem A right now--how to get 120 cash by this afternoon. Then problem B, skiing, will be resolved.
Originally Posted by gfacter,Mar 5 2010, 10:04 AM
I need to be home NLT 8

I've been nutty busy ever since my boss got back and today does not look any better. Ain't no way I can get out of here at a reasonable hour to make it worth the effort. Plus I don't have any of my kit with me; I'd have to rent everything.
Can we maybe plan a time for next week? That will give me a chance go prep and make sure I can clear my evening. I fail at short notice...












