Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
MW2FTW
Help with Java code? Beginner Classes and Objects.?
This is my first time working with classes and objects, but trying to learn the entire concept in just a couple of days has been challenging. I wrote this code that's supposed to take the user's input and store it into an array, then ask the user about a deposit and/or withdrawal and then print the account information after the deposit/withdrawal and then repeat the process if the user wishes. I have the basic part of the code but I'm running into trouble with getting information across the two classes. I know that some of the things I'm trying to do (like writing to a variable in the tester class that was initialized in the main class) is wrong but I don't know how to fix it. If I could get some help, that would be great. Sorry, I'm new at this. Also, I posted my two programs on GitHub for access (I would've posted them directly on here but I already had them on GitHub). The one that says "Driver" is the test class.
Programming & Design6 years agoHelp with some simple Java code?
I'm making a SD calculator and I'm using an array to do so. It's supposed to accept positive doubles and if a negative double is entered, the program stops prompting the user for numbers, if a non-number is entered, the program is supposed to ask the user to enter a valid double and continue. The code I have here just keeps repeating the following several times:
"Enter a valid double number:
Enter your number"
for(int i = 0; i < scores.length; i++)
{
System.out.println("Enter your number: ");
if(scan.hasNextDouble())
{
scores[i] = scan.nextDouble();
if(scores[i] < 0)
{
break;
}
count++;
}
else
{
System.out.println("Enter a valid double number: ");
}
}
1 AnswerProgramming & Design6 years agoHelp with simple Java program?
Hi, I'm trying to make a simple program in Java that generates the calendar for a user-inputted year after 1800. The bulk of my code works, it calculates everything perfectly. But for some reason, the entire month of November's body gets skipped and I can't figure out why. Also, I'm trying to have it output what day Thanksgiving is for a given year, as you can see in my "thanks" method and have it say "Thanksgiving is November (day)" after it prints the body for the month of November. I'm not sure wether my method for "thanks" is correct but I do not know where to put the print statement for Thanksgiving or what parameters to pass for the statement. Any help would be much appreciated.
Here is my code: https://github.com/MrTechCenter/Java-Calendar
3 AnswersProgramming & Design6 years agoHow to cut-off a string in Java?
So I have this string: www.google.com
I want to change it in a method so when I call the method it just shows: google
How can I cut-off the "www." and ".com" ?
1 AnswerProgramming & Design7 years agoCannot find symbol error messages on java code?
I'm getting these error messages on my java code and I cannot figure out what I'm doing wrong. Here is a link to my code: https://github.com/MrTechCenter/CSC/blob/master/Ma...
These are the errors I'm getting:
MadLib.java:17: error: method questions in class MadLib cannot be applied to given types;
questions();
^
required: Scanner
found: no arguments
reason: actual and formal argument lists differ in length
MadLib.java:24: error: cannot find symbol
String city = console.nextline();
^
symbol: method nextline()
location: variable console of type Scanner
This error repeats for every single use of "console.nextline();"
Please help! I have a feeling it's something obvious that I'm just missing but I don't know what it is.
1 AnswerProgramming & Design7 years agoShould I tell her how I feel?
So there's this girl I'm friends with. When we were Sophomores we had 3 classes together so we talked all the time and hung out. We're Seniors now. I've been to her house a couple of times and met her family, I got her her first pair of Minnie Mouse ears with her name stitched into them as a souvenir from when I went to Disneyland last summer and promised to take her in the spring because she's never been there. We went to Junior Prom together last March. Now we have a class together and we talk all the time and we see each other every day and we hug every time we see each other. I have feelings for her, obviously. But she has a boyfriend, it's some guy from another school kinda far away that she doesn't even see that often but I guess they're close. She has to work two hours away every weekend and we're missing homecoming because of it, but I'm planning on driving down and surprising her with flowers and a dance. I'm not sure if I should tell her how I feel then, or wait things out.
1 AnswerOther - Family & Relationships8 years agoHow to do this Physics problem?
Ok. So we threw a ball straight up in the air and measured the distance the arm travelled before the ball was released, and we got the time the ball was in the air. Using that, I need to calculate the initial velocity (that was easy, just divide the distance by time). I'm not sure how to calculate the max height, or the acceleration of the arm. And I also need to know how to figure out where the ball is at different time intervals because I need to graph it.
3 AnswersHomework Help9 years agoShould I ask her to homecoming?
There's this girl who's in a couple of my classes that I've known since like 4th grade (we're juniors now) but we haven't really talked until recently. She used to hate me. Then she started talking to me. Last Valentine's day I sent her a rose and I heard from someone that she said she kinda likes me. We talked the other day and she sounded really enthusiastic. She said she's gone to Homecoming the last 2 years but by herself and said she's not sure if she wants to go this year. So I'm thinking that she's only going to go if someone asks her. I just don't think we know each other well enough yet. Should I go for it, because I don't want to blow it and have to see her twice a day and think about what could have been.
6 AnswersSingles & Dating9 years agoJetblue Airways or Southwest Airlines?
Me and my friends are going to LA at the end of July and we have a couple of airfare options. I've never flown on Jetblue or Southwest before, I've always flown United and occasionally Alaska. Anyway, our options are:
-Sacramento to Long Beach on Jetblue for $149 round-trip
-Sacramento to Los Angeles International on Southwest for $200 round-trip
-Sacramento to Burbank on Southwest for $200 round-trip
-Sacramento to Orange County on Southwest for $200 round-tip
-Sacramento to Ontario on Southwest for $200 round-trip
We don't have a preference as to where the airport is in proximity to where we're going once we're there because we have someone to drive us around there. So which airline is better? And which airport is the best (in terms of delays, luggage, etc.)
1 AnswerAir Travel9 years agoDoes this seem like a legitimate deal?
I found this deal on Craigslist for a 2008 Toyota Tacoma. The seller has included several photos of a Toyota Tacoma to the exact specs that were specified in his description in front of a suburban house. I contacted the seller via email and he stated that he was in the US army and was currently stationed in Madrid and that his vehicle was located at the Military Logistics Department at Fort Lewis, Washington. He said:
"For the payment I would like to use Google Checkout as a third party. They will keep your money into a protection account until you get the truck and will release it to me after inspection period is over and you agree to keep it. So, this is not a blind transaction, you can see the truck before committing to buy and to eliminate any concerns you will have 10 days to inspect it. If you decide not to keep it Google Checkout will refund you the money, no questions asked, and shipping back will be my concern"
He also said that the truck would be shipped down from Fort Lewis to my location (Sacramento, CA) free of charge. It seems like a slightly sketchy but OK deal. My biggest concern is the price which is only $2,200.
3 AnswersOther - Business & Finance9 years agoWhere to find discounted Disneyland tickets?
I'm looking to buy a few Disneyland 3-day park hoppers for a cheaper price than what Disney is offering ($200+). I live in Sacramento, CA (Northern California) and heard you can get discounts for living in California. I also have AAA but I heard that they no longer offer cheaper tickets.
5 AnswersLos Angeles9 years agoQuestions about DisneyWorld vacation?
Me and my mom and a few of our cousins are planning on going to DisneyWorld next year. There's 5 of us total. We live far away so we need to fly, so are there any airlines that offer great vacation packages? Which hotels are the best to stay at there (both Disney-owned and good neighbor hotels)? Overall, how should we go about doing this?
3 AnswersOrlando9 years agoHow/Where to Pre-Order Modern Warfare 3?
I can't find anywhere that's selling pre-orders for Modern Warfare 3 Hardened Edition online! Which stores still sell them if you walk-in and buy a pre-order? Cause I heard GameStop is sold out of pre-orders. Also, how much do you think GameStop would give me for an Xbox 360 copy of Dead Island (not missing anything, no scratches, works perfectly).
2 AnswersVideo & Online Games10 years agoHow does an iPhone Pre-Order work?
I'm going to Pre-order the iPhone 4s (two actually, same contract). I want to know what they ask for when you pre-order it online. Like do you just put in your Apple ID and phone number and it charges your Apple ID credit card, or do they charge it to your wireless carrier bill or what? How does it work? And how does the shipping tracking work?
1 AnswerCell Phones & Plans10 years agoHow to go about vacation?
Me and my friends are planning a vacation to LA and we already know that you can book flights and hotels together for cheaper (if we decide to fly). Is there any way you can bundle tickets to places like Magic Mountain and Universal Studios along with your flight and hotel? Also, what are some fun things to do in LA besides the amusement parks.
1 AnswerOther - Destinations10 years agoShould I try and go for her?
There's this girl that i've known for a few years now, and we don't hang
out that often but we talk in class if we're sitting next to each other. Me and my friends always teased her (in a friendly way) in math last year. She's in my history class this year, and whenever our eyes come in contact across the room, she always kinda smiles and then looks down, i do the same thing. She ALWAYS laugh when I
tease her or tell jokes. She doesn't really try to hang out with me outside of class though. She always smiles when she sees me and kinda stares until I pass. She always compliments me on being smart. We both really want to go to Homecoming but none of our friends are going and neither of us have dates. Should I try and ask her out? Do you think she's even interested in me?
4 AnswersSingles & Dating10 years agoWhat to do with ruined friendship?
I've been known this girl since like 4th grade and we became good friends in 7th and 8th grade. So naturally I developed a crush on her, but I purposely kept it a secret, for the sake of our friendship until 9th grade when word got around that I liked her and a lot of people were trying to force me to ask her out, but I couldn't, so I didn't but she had found out by then. It's been over a year since then and she hasnt talked to me since and my friend said that she told her it's because she doesnt want me liking her. I just want to be friends and she wont listen to anyone that tells her that. I cant move on from her, its too hard. What should I do?
3 AnswersFriends10 years agoAT&T U-Verse and Vonage?
I'm currently with Comcast for internet and they are not fixing a problem that is effecting the whole neighborhood who has Comcast (the problem has been around for about a month). So we're switching to AT&T U-verse. When we switch, we are only getting internet, nothing else. Will Vonage work over AT&T's U-verse network? Or will we have problems?
2 AnswersComputer Networking10 years agoAT&T U-Verse Internet availability?
I want to get AT&T U-Verse Internet because I'm tired of the issues we have with Comcast. On the website it says that it's available in my general area but when I enter my address it says that it's not available. Why is this?I believe that some people in my neighborhood have U-Verse but I'm not sure.
1 AnswerOther - Internet10 years agoIs this a problem with the modem?
I have a Linksys CM100 cable modem that I've had for several years now. It's always been fine up until now, but for the past week or two, it randomly drops the internet connection. The LEDs on the modem are all solid green except for the "Link" light. I have the modem "Linked" to the router. I know it's not the router's problem, because I tried connecting the computer directly to the modem and same problem. Is the modem just failing? I also tried a different ethernet cable. I know it's not Comcast either, because my neighbor hasn't had problems and he has Comcast internet too.
1 AnswerComputer Networking10 years ago