« first day (1194 days earlier)      last day (2281 days later) » 

2:00 PM
for booleans, you never do == right?
unless you are comparing two booleans
yup, just trying to refresh my memory haha, new semester
 
== is always comparing
= is assignment
boolean finished = false;
is assigning boolean value of finished to false
if you wanted to compare/check what it is
 
i see
 
if (finished == true) {
//Do something
}
or even just,

if (finished) {
 
ahh
also, if i say enter -1 for donationAmount, won't it add to the total even tho i am using it to exit?
 
that last one, will run if 'finished' is true
 
2:02 PM
oh yeah, by default right?
we learned about that
 
Its just shorter to type
finished == true

is the same as

finished
finished == false

is the same as

!finished
 
i ran into an error :/
if I say yes on the default for the campGoal
and it defaults to 10000
it immediately will show the print message
wait
i might have scrwewd up something
 
And yes -1 will be added
 
nvm I fixed it
 
So you need to only add to the total amount if amount is bigger than 0
 
2:07 PM
so I can change that else line to else if
 
brb
 
kk
 
Hows it going?
 
not bad
i think my logic is off on the print report function
 
What i did was

if (donationAmount == -1) {
finished = true;
} else if (donationAmount < -1) {
JOptionPane.showMessageDialog(null,
"Error: please enter a valid donation amount: ");
} else {
donationTotal += donationAmount; //add the donation amount to the donation total
}
 if (donationAmount == -1) {
            	finished = true;
            } else if (donationAmount < -1) {
                JOptionPane.showMessageDialog(null,
                        "Error: please enter a valid donation amount: ");
            } else {
                donationTotal += donationAmount; //add the donation amount to the donation total
            }
hmm this formatting feature is neat
although thats not quite right
 
2:14 PM
where are you placing that chunk?
i see if(donationAmount <0){
on mine
nvm
haha
 
So if its -1, it will set finished true
 
if I enter -1 it doesn't exit the loop
 
Have you put the condition in the loop?
 
oh..
i just did that but it scrwewd my code up
 
What did you put?
 
2:20 PM
while(finished =false || donationTotal < campGoal)
is that good?
i had && and i think it scrwewd it up
 
Remember the double equals
your assigning false to finished everytime
 
okay, i fixed that and it still doesnt exit
 
probably because of the ||
What that will do, is check if finished is false OR donationTotal is smaller than the campGoal
finished may be true
 
oh
yeah
 
but if the donationTotal is still smaller than the campGoal
 
2:22 PM
does the order of them not matter?
 
"Oh cool, ill keep running then"
na
at least not that i know of
 
okay it worked with &&
 
yeah, bit tricky
 
yeah I need to be slower
 
have to really think what you want it to do when using || and &&
 
2:23 PM
and think through
yea
 
I still mess that up sometimes :P
 
haha I feel better now :D
 
dude you havent slept
go easy on yourself :P
 
haha yea ture
true*
 
Cool so we should be meeting more of those requirements now
 
2:24 PM
Yes, I am checking for like all different possibilities
I think I have another issue
in the data definition class
public double calculateFee(String campType, double donationTotal){
      if(campType.equalsIgnoreCase("For Profit")){
         return donationTotal+= (donationTotal - (donationTotal*0.05));
      }else if(campType.equalsIgnoreCase("Non Profit")){
         return donationTotal;
      }else{
         return donationTotal;
    }
   }
  }
This is supposed to be like
IF campaign type is non profit, do not calculate with the fee.
 
Right
 
IF campaign type is for profit, donations have a 5% fee
 
Ok
 
so, I wanted to just do 5% times the total, which is the same right?
the same as doing it individually
to each little donation lol
 
erm
oh so you need to fine them for each donation
 
2:37 PM
isnt 5% of 10000 the same as( 5% of 3000 + 5% of 2000 + 5% of 5000)
just as example
i think it should be
 
Sorry back now
and no
:p
wait let me double check
pretty sure it isnt
oh wait
you might be correct actually
 
public double calculateFee(String campType, double donationTotal){
      if(campType.equalsIgnoreCase("For Profit")){
         return donationTotal+=(donationAmount-(donationAmount*0.05));
}else if(campType.equalsIgnoreCase("Non Profit")){
         return donationTotal;
      }else{
         return donationTotal;
    }
   }
  }
is that good?
i need to pass the donationAmount though
 
Why dont you just calculate it at the end
take 5% off the total
 
o
how?
 
Your on the right track,
 
2:45 PM
i think we are supposed to have a method for each thing we want to do
 
your passing donationTotal right
Yeah thats fine
so if campType is For Profit
double donationPlusFee = donationTotal * 0.95
return donationPlusFee
OR
you can shorten that to
return donationTotal *= 0.95
 
@IonutFratila Heya, you cant chat here until you earn at least 20 reputation. Mean while you can see chat of others and learn if you find it useful. Also contribute on SO by asking and answering questions ^^
 
wait
what?
lol
 
You want to remove 5% off the final donation amount right?
 
yep
 
2:49 PM
Yeah you can do that using

* 0.95
 
so multiplying by 0.95 is the same thing
wow im stupid lol
i did total - total*0.05
 
yeah thats fine too
Doesnt really matter
 
im gonna test this
 
Im crap at maths too dont worry
 
haha
 
2:50 PM
just things ive picked up from reading others code
over the last 2 years or so
 
ah
what do you do for living?
 
Software developer, work from home
 
oh cool
 
working on something as we speak atm
 
@Hello I eat a lot!
 
2:50 PM
thats what i want to do, when i become much better haha
haha
I like eating too :D
 
I consider myself really bad
 
haha
nop
you are good !
 
Ive heard some senior software developers still copy paste switch statements because they forget the syntax and all sorts lol
 
That is rly funny haha :D
 
which to be fair, i do sometimes
 
2:52 PM
They make you memorize it for school but at the end of the day, every1 will google it
 
I work in 2 different languages at the same time
 
some stuff
 
and now im working in java too :P
 
you do javascript and what else?
 
I know some C++
C#
 
2:52 PM
haha sorry, I have you learning so many language
 
Golang
javascript
tiny bit of PHP, not a fan of PHP though
 
oh cool
i only know java and python
im new to this
but i rly like it
one day, i will be a commenter in stackoverflow maybe :D
and help other ppl
 
That's the spirit you should have anyway
 
Ive tried python too
Did some machine learning basics using it
that shits confusing man
 
commenter?
 
2:55 PM
But python seems really powerful
 
@neferpitou Just a comment and OP has his answer.
 
like, someone that can actually contribute to questions on this site instead of only asking like I do :D @neferpitou
 
That's what he meant iiuc
 
at this pt, i dont know enough to help others
one day though
 
2:56 PM
sleep now :3
or else
 
I have one last logic error
lol
 
Why to sleep? Is it night already ?
 
your cat will invade your bed
 
:(
I woke up at likee this same time yesterday
 
so, anyone here with experience in Fused Location API?
 
2:57 PM
This assignment is due in like 12 hrs
 
@AbhayShukla What's problem ?
 
How do I implement the flushLocations method?
it's a new addition and I cant find any tutorial
 
What do you mean ?
 
No sorry I dont know it
 
@AbhayShukla that isnt hard :(, btw you really need to show what you have done.
 
3:00 PM
^
 
@Miller The fee code isnt working
lol
 
whats it doing
 
it ignores that
function
 
I havent done much yet, tbh I'm new on android but I have a few ideas.. sadly all of them are based on getting the users locations as accurately as possible
so just concentrating on the map now
 
well Miller im gonna go walk lol
Thanks for the help <3
 
3:04 PM
Im not seeing where your calling it
 
@Hello walk :( ??? why not sleep???
 
oh yeah, i have to call it in the implementation calss right?
 
omg
 
@neferpitou Well, idk
lol
I wont die
 
3:05 PM
Your not calling it anywhere
 
can anyone give me the code for flushLocations()?
 
Of course its ignoring that function, your not using it
 
no example over the web
 
:P
 
isBotActive
/help
 
3:07 PM
Commands=====================
/8ball     Simulates a magic 8-ball.
/about     Displays information about this bot.
/define    Displays word definitions from the dictionary.
/help      Displays this help message.
/http      Displays information about HTTP status codes and methods.
/javadoc   Displays class documentation from the Javadocs.
/roll      Rolls a variable-sided die or makes a choice.
/shutdown  Terminates the bot (admins only).
/tag       Displays the description of a StackOverflow tag (acts like a Computer Science urban dictionary).
 
yepe
/8ball Can I gurantee that @minato is having a date?
 
@neferpitou Yes
 
is this an OK way to override an abstract method?
@Override
public PendingResult<Status> flushLocations(GoogleApiClient googleApiClient){
}
 
/8ball Is it true that @minato is planning for a s******* ?
 
@neferpitou It is certain
 
3:10 PM
@AbhayShukla of course thats the purpose of abstract method
 
(y) just making sure
 
oh has @hello
died
 
/8ball is hello alive?
 
@neferpitou Are you kidding? No!
 
3:13 PM
oh dear
 
^ no, according to the Oracle OakBot aka JavaBot
 
Jesus
/8ball How come you know everything ?
 
@TheLittleNaruto Better not tell you now
 
lol
*bye all
cout << "Good bye world!" endl;
return 0;
 
3:17 PM
bye
 
Bye
 
@Miller Hi
Im back
oh bye !
I have an idea
 
3:32 PM
@hello
hello
 
I forgot my idea
However, I have a muffin now
 
Wonderful
 
hahaha
:P
 
hello people
whats the best way to connect an android app to MS SQL
 
Where are you located @hello
 
3:42 PM
@Miller right here
you mean IRL?
lol
 
yes
 
Virginia
USA
 
ah
 
yourself?
 
whats the time for you then?
UK
 
3:47 PM
oh I see
its 10:47 AM
 
ah if you was in the UK, you'd have 5 less hours to do this assignment :P
 
haha yup :)
Thank god
or anyone else
anyway, about the calling method thing
im confused because that method is in the other file
and how will I call it in the main?
 
Its part of the campaign object
myCampaign().calcuateFee(campType, donationTotal)
Although since its part of that object, you do not need to pass it campType
Since the campaign holds that
this.CampType
Well, it should do anyway
yeah it does
 
o
3
where am I doing the call?
 
I dont know, you tell me
When do you need to do this?
at the end?
at the beginning?
 
3:56 PM
The end of the implementation class
 
Remember what your trying to achieve
 
So I will call it like this:
actually, dunno how lol
im too tired to think
i believe itd be
idk
 
Well you want to calculate the fee after all donations have been done
 

« first day (1194 days earlier)      last day (2281 days later) »