User was searching for: a program that determines the winner of a sales contest would in put the number of units sold by each salesperson. the one who sell the most winnes. use a series of 10 single digit number as characters a determine the winner.
** joined: guest
** joined: nentwined
nentwined: howdy. :)
nentwined: what are you looking to use this program for? or was this a "test" search?
guest: i am in html class and need to know how to think in a problem solving way
guest: its structure building and java
nentwined: so at the most basic level, it's input and output, which is most things. do you know how many salespeople there are to begin with? i.e. can you have a precise number of form elements?
guest: no! the question is the process of finding the largest value is used frequently in computer applications. for example, a program tht determines the winner of a sales contest would input the number of units sold be each salesperson. the salesperson that sells the most units wins the contest.
guest: then it said to design an application that inputs a series of 1- single digit numbers as characters, and determines and prints the largest of the number
nentwined: a standard way to end a list of numbers is when a user inputs "-1"... so if you wanted to you could not display anything until they typed in -1... (but still keep the logic the same... you never need to remember anything other than the current largest number)
guest: well! what about this one
nentwined: :heh: :) fire away. :)
guest: Because of energy conservation, ecology and hogh price of gasoline, drivers are concerned with miliage obtained by their automobiles.one diriver has kept track of several tanks of gasonline by recording miles driven and gallons used for each tank. the program
guest: the program should calculate and display the miles per gallon obtained for all tanks up to this point. all average calculations should produce floating-point results. use two texfields to input the data
nentwined: hmm. two textfields means one for number of miles, one for number of gallons. so be sure to label those clearly. then you're doing the same thing as the first problem, basically. keep a total number of miles and a total number of gallons. divide for display. (keeping the totals instead of a current average is better form -- more precise. keeping a running average leads to unsightly rounding errors)
nentwined: anything else I can do you for? :)
guest: are you ready?
nentwined: certainly. just hacking away at globealive in my spare cycles. :)
guest: Develop an application that will determine if a department store customer has exceeded the credit limit on a charge account. for each customer, the following facts are available:
guest: a- account number
guest: b-balance at the end of the month
guest: c-total of all items charged by this customer this month
guest: d-total of all credits applied to this customers' account this month
guest: e-allowed credit limit
guest: the program should input each of the facts from Textfields as integers, calculate the new balance(=beginning balance=charges-credits), display the new balance and determine if the new balance exxceeds the customers' credit limit.
guest: for those customes whose credit limits is exceeded, the program should display the message,"credit limit exceeded
nentwined: okay. well, just to do things as simply as possible... you'll notice you don't need the account number for anything. make sure to give each textfield a unique name to make accessing them easier... and then it's just e-(b+c-d) ... that's the current available credit. as for display, I'd just do a little popup alert box because they're simple. :)
nentwined: (not really anything to that one, compared to 1 and 2...)
guest: laugh out loud!
guest: no ! on the other hand you may wake somebody!!!
nentwined: yeah. gf's asleep in the other room. :)
guest: I have to do structurebuilding how would i do that with a problem similar to these?
nentwined: again, presuming by structure you mean data structure... hmm. I don't know offhand with javascrit. but I do have a book. one moment. :)
guest: it's were you have to link then you have the yes for the right solution and no for wrong, but it has to loop back around to be able to continue rotating
guest: you have a start point and a stop what way work and what way won't
guest: it starts with the declare variable
guest: o.k.! thank you!
guest: please continue to have a Blessed Day!
guest: i need to practice for my test this morning
nentwined: :heheh: good luck on that. here's one thing that might help you understand the list thingy -- http://www.mychandu.homestead.com/computers.html -- I haven't looked at it, but... :)
nentwined: really the structure you're describing is a "tree", but a tree is just a linked list with more than one "next" (a next-yes and a next-no, or in more common vernacular a "left" and a "right" :)
guest: o.k! thank you very much! yes it is!
nentwined: =) good luck on your test, and I'll do my best not to come down with a cold. hoping it's just the vaccuming earlier. :)
guest: Thank you ! i have an hour before i have to get ready to go
nentwined: my pleasure. :) [to end chat, just close this window] :)
** unjoined: guest