Can anybody write this program

A perfect number is a positive integer such that the sum of the divisors equals the number. thus, 28 = 1 + 2 + 4 + 7 + 14 is a perfect number. If the sum of the divisors is less than the number, it is deficient. If the sum exceeds the number, it is abundant. Write a program that takes a positive integer as input and displays a message box that indicates whether the number entered a perfect, deficent, or abundant. Your program should define the following two methods

boonlean isDivisor (int number, int divisor)

int divisorSum (int number)

The method isDivisor returns true if the divisor parameter is a divisor of the number parameter, and false otherwise. the divisorSum method uses isDivisor to accumulate and return the sum of the proper divisors of the number parameter. Be sure to design and test the program incrementally; that is, verify that isDivisor works correctly before using it in divisorSum.

[935 byte] By [Dillona] at [2007-11-27 5:08:26]
# 1
To answer your subject line, yes.
Hippolytea at 2007-7-12 10:27:52 > top of Java-index,Java Essentials,Java Programming...
# 2
please does anyone mind writing is for me
Dillona at 2007-7-12 10:27:52 > top of Java-index,Java Essentials,Java Programming...
# 3
Yes.
tschodta at 2007-7-12 10:27:52 > top of Java-index,Java Essentials,Java Programming...
# 4
> please does anyone mind writing is for meThat's not the way these forums work. But try the Java Ranch: http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=forum&f=33People are friendly there and will do your homework.
Hippolytea at 2007-7-12 10:27:52 > top of Java-index,Java Essentials,Java Programming...
# 5
i really need to get this program for school and nobody in my class including the teacher bc he's a coach know how to do it so can someone please write it for me
Dillona at 2007-7-12 10:27:52 > top of Java-index,Java Essentials,Java Programming...
# 6

> please does anyone mind writing is for me

surely someone won't mind

to increase your chances and the reaction speed, it helps if you already post your name, name/nb of the course, name of teacher/professor, you know the likes, so someone can just fill in the rest and give you a complete file

OnBringera at 2007-7-12 10:27:52 > top of Java-index,Java Essentials,Java Programming...
# 7

I tried, but I keep getting this exception. Anybody got a clue?

[java] [2007-05-22 10:37:19,847] ERROR common.config.AccountingCommonConfig - Application Error: java.forums.LazyStudentException -

[java] java.forums.LazyStudentException: Forum users generally refuse to do your homework for you

[java]at java.forums.beg(LazyStudent.java:529)

[java]at java.forums.askSomeoneElse(HomeworkDoer.java:143)

[java]at java.forums.doHomework(LearnJava.java:537)

[java]at main(Homework.java:543)

...

kevjavaa at 2007-7-12 10:27:52 > top of Java-index,Java Essentials,Java Programming...
# 8
> the teacher bc he's a coach student: Well I implemented a case analysis using instanceofcoach: You call that object-oriented programming? You call that open-ended? I want you to drop and give me twenty-five!
Hippolytea at 2007-7-12 10:27:52 > top of Java-index,Java Essentials,Java Programming...
# 9
> I tried, but I keep getting this exception. Anybody got a clue?C'est dr鬺e!
Hippolytea at 2007-7-12 10:27:52 > top of Java-index,Java Essentials,Java Programming...
# 10

I'll try...

public boolean isDivisor (int number, int divisor)

{

return (Math.random() > 0.5f);

}

public int divisorSum (int number)

{

return number + 1;

}

bsampieria at 2007-7-12 10:27:52 > top of Java-index,Java Essentials,Java Programming...
# 11
> the teacher bc he's a coachI'm stilling loving that image:You know VB.NET? I guess you think that makes you hot ****? Well, that just makes you a little ****-sucking *****. You don't know a god-**** thing.
Hippolytea at 2007-7-12 10:27:52 > top of Java-index,Java Essentials,Java Programming...
# 12

> I'll try...> public boolean isDivisor (int number, int divisor)

> {

>return (Math.random() > 0.5f);

>

> public int divisorSum (int number)

> {

>return number + 1;

PROB SOL! Now gimme the money, Erm, I'm bsampieri's manager so

I'm very import^W^W^WI^H our companny have finished the project

succesfully and my^H^Hour bill is in the mail.

kind regards,

Jos (CTO ;-)

JosAHa at 2007-7-12 10:27:52 > top of Java-index,Java Essentials,Java Programming...
# 13

> i really need to get this program for school and

> nobody in my class including the teacher bc he's a

> coach know how to do it so can someone please write

> it for me

Why do you think that's relevant? It's your homework, so it's your responsibility. The point is not to end up with that code written. The point is to go through the exercise of doing it so you learn something.

Start here:

[url=http://java.sun.com/docs/books/tutorial/]Sun's basic Java tutorial[/url]

[url=http://java.sun.com/learning/new2java/index.html]Sun's New To Java Center[/url]. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.

[url=http://javaalmanac.com]http://javaalmanac.com[/url]. A couple dozen code examples that supplement [url=http://www.amazon.com/exec/obidos/tg/detail/-/0201752808?v=glance]The Java Developers Almanac[/url].

[url=http://www.jguru.com]jGuru[/url]. A general Java resource site. Includes FAQs, forums, courses, more.

[url=http://www.javaranch.com]JavaRanch[/url]. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.

Bruce Eckel's [url=http://mindview.net/Books/DownloadSites]Thinking in Java[/url] (Available online.)

Joshua Bloch's [url=http://www.amazon.co.uk/exec/obidos/Author=Bloch,%20Josh]Effective Java[/url]

Bert Bates and Kathy Sierra's [url=http://www.amazon.com/exec/obidos/tg/detail/-/0596004656?v=glance]Head First Java[/url].

James Gosling's [url=http://www.bookpool.com/sm/0321349806]The Java Programming Language[/url]. Gosling is

the creator of Java. It doesn't get much more authoratative than this.

jverda at 2007-7-12 10:27:52 > top of Java-index,Java Essentials,Java Programming...
# 14
Great!Can I get the afternoon off now?!
bsampieria at 2007-7-12 10:27:52 > top of Java-index,Java Essentials,Java Programming...
# 15

<rant>

What I find truly reprehensible about this thread in particular is that there is absolutely no attempt on the part of the OP to do ANYTHING at all for themselves. A search of THIS FORUM would have yielded the answer that he's looking for, as it's already been discussed here and a perfectly viable solution was included for the purposes of explanation.

For the OP if you cannot be bothered to put for the effort to learn what you're doing to understand what you're about in this class and to at least make an effort to accomplish the task before you. First of all you do not deserve the aid or consideration of anybody on this forum. Secondly, you do absolutely deserve to fail. Thirdly, passing the class without learning the material is the absolute worst form of social masturbation an exercise in futility and ultimately a burden on the society that you obviously have no concern for. Finally, the fact that your instructor is a "coach" is irrelevant. He may or may not be qualified to teach this class but at least he's taking a bash at it and trying to do something constructive for his students.

Grow up, develop some backbone and some respect for yourself for the craft itself and for the people who's help you are trying to acquire.

</rant>

PS.

puckstopper31a at 2007-7-21 21:20:13 > top of Java-index,Java Essentials,Java Programming...
# 16
<deafening applause/>
hunter9000a at 2007-7-21 21:20:13 > top of Java-index,Java Essentials,Java Programming...
# 17
Flame on, d00d!
Hippolytea at 2007-7-21 21:20:13 > top of Java-index,Java Essentials,Java Programming...
# 18

<texan>

<firePeaShooter direction="up" times="6" />

Yeehaw!

</texan>

I've seen (and been part of) threads that went for pages and days helping somebody to do their homework (I once helped a kid here that said he was in the fifth grade to understand polymorphism).And people here will bend over backwards to do that. We get warm fuzzies from it.

I get no warm fuzzy from computing perfect numbers. I've taken Calc I and II (and barely passed :), and have been through Intro Java, so it poses no growth potential for me. Doing it for you would also pose no growth potential for you. Thus, you get (rightfully) snide replies and condemnations.

If you're willing to go to the effort, so are the people here, generally.

kevjavaa at 2007-7-21 21:20:13 > top of Java-index,Java Essentials,Java Programming...
# 19
It would seem our gentle remonstrances have scared the OP away. Pity.
jverda at 2007-7-21 21:20:13 > top of Java-index,Java Essentials,Java Programming...
# 20
> It would seem our gentle remonstrances have scared> the OP away. Pity.And I was being so nice and everything.PS.
puckstopper31a at 2007-7-21 21:20:13 > top of Java-index,Java Essentials,Java Programming...
# 21
> It would seem our gentle remonstrances have scared the OP away. Pity.Send them to JavaRanch, I say. Unless you enjoy the tantrum that usually ensues by reply #25...
Hippolytea at 2007-7-21 21:20:13 > top of Java-index,Java Essentials,Java Programming...
# 22
Who doesn't enjoy a good tantrum?
hunter9000a at 2007-7-21 21:20:13 > top of Java-index,Java Essentials,Java Programming...
# 23
WAAAA!!!I wanna see a tantrum RIGHT NOW!!(kev - father of a four-year-old)
kevjavaa at 2007-7-21 21:20:13 > top of Java-index,Java Essentials,Java Programming...
# 24
> WAAAA!!!> > I wanna see a tantrum RIGHT NOW!!> > (kev - father of a four-year-old)Heh heh I remember those days, now it's all, "dad give me money" or "dad I need the car" or "it's my room I shouldn't have to clean it."PS.
puckstopper31a at 2007-7-21 21:20:13 > top of Java-index,Java Essentials,Java Programming...
# 25

> "it's my

> room I shouldn't have to clean it."

That's when you tell him that until he starts paying rent, it's your room, and you get to decide who cleans it. I imagine if he's faced with either getting a job or cleaning his room, cleaning it won't look so bad anymore. :)

hunter9000a at 2007-7-21 21:20:13 > top of Java-index,Java Essentials,Java Programming...
# 26
> i really need to get this program for school and> nobody in my class including the teacher bc he's a> coach know how to do it so can someone please write> it for meI'm guessing that 'Coach' also teaches the English class.
ScarletPimpernela at 2007-7-21 21:20:13 > top of Java-index,Java Essentials,Java Programming...
# 27

int i = Integer.MAX_VALUE;

int total = 0;

for (int j=1; j<i; j++) {

if ((i % j) == 0) {

total += j;

}

}

if (total == i) System.out.println("Perfect");

else if (total >< i) System.out.println("Deficient");

else System.out.println("Abundant");

Chickena at 2007-7-21 21:20:13 > top of Java-index,Java Essentials,Java Programming...
# 28

> i really need to get this program for school and

> nobody in my class including the teacher bc he's a

> coach know how to do it so can someone please write

> it for me

If the teacher can't do it then how will he know if you did it wrong ? Either he is handing out marks without actually knowing or he does know and you haven't gone to him. If I was a betting man I know which one I would be going with.

Aknibbsa at 2007-7-21 21:20:13 > top of Java-index,Java Essentials,Java Programming...
# 29

chicken evolution

int i = 8128;

int stop = i / 2 + 1;

int total = 0;

for (int j=1; j<stop; j++) {

if ((i % j) == 0) {

total += j;

}

}

if (total == i) System.out.println("Perfect");

else if (total >< i) System.out.println("Deficient");

else System.out.println("Abundant");

Chickena at 2007-7-21 21:20:13 > top of Java-index,Java Essentials,Java Programming...