Win a copy of Spring Boot in Practice this week in the Spring forum!

# Claire Fuente

Ranch Hand
since Feb 07, 2004
Cows and Likes
Cows
0
In last 30 days
0
Total given
0
Likes
0
0
Total given
0
Given in last 30 days
0
Scavenger Hunt
Ranch Hand Scavenger Hunt
Greenhorn Scavenger Hunt

## Recent posts by Claire Fuente

Campbell Ritchie wrote:
You will find life much simpler if you complete one assignment at a time. What you learn from one will help you solve the others. Try the tax example first.

I'm trying to do your advice and wrote down the possible modules needed in this problem. I also thought of starting with the sales tax problem since I find it easiest to analyze. However, I'm stuck on the formula on how I would do a syntax on

"The rounding rules for sales tax are that for a tax rate of n%, a shelf price of p contains (np/100 rounded up to the nearest 0.05) amount of sales tax. "

Sorry but I'm not good in math .

I got the output right on sample:

Given :
Basic tax = 10%
import duty is additional = 5% no exemptions

1 imported bottle of perfume at 27.99 x (10%+5%) = 4.2

27.99 + 4.2 = 32.19

Output 3:
1 imported bottle of perfume: 32.19

But got a different answer when the input is:
1 imported bottle of perfume at 47.50 x (10%+5%) = 7.125

47.5 + 7.125 = 54.625

Expected output is :
1 imported bottle of perfume: 54.65

10 years ago

Campbell Ritchie wrote:You will find life much simpler if you complete one assignment at a time. What you learn from one will help you solve the others. Try the tax example first.

I'm trying to do your advice and wrote down the possible modules needed in this problem. I also thought of starting with the sales tax problem since I find it easiest to analyze. However, I'm stuck on the formula on how I would do a syntax on

"The rounding rules for sales tax are that for a tax rate of n%, a shelf price of p contains (np/100 rounded up to the nearest 0.05) amount of sales tax. "

Sorry but I'm not good in math .

I got the output right on sample:

Given :
Basic tax = 10%
import duty is additional = 5% no exemptions

1 imported bottle of perfume at 27.99 x (10%+5%) = 4.2

27.99 + 4.2 = 32.19

Output 3:
1 imported bottle of perfume: 32.19

But got a different answer when the input is:
1 imported bottle of perfume at 47.50 x (10%+5%) = 7.125

47.5 + 7.125 = 54.625

Expected output is :
1 imported bottle of perfume: 54.65

10 years ago
Hi Guys!

I need a code that works on a sample problem below. I am not a good java programmer and I'm trying to do it too but my solution might be incorrect. You may not use any external libraries to solve this problem, but you may use external libraries or tools for building or testing purposes.

Discount Offers

Our marketing department has just negotiated a deal with several local

merchants that will allow us to offer exclusive discounts on various

products to our top customers every day.

The catch is that we can only offer each product to one customer and we

may only offer one product to each customer.

Each day we will get the list of products that are eligible for these

special discounts.

We then have to decide which products to offer to which of our

customers.

Fortunately, our team of highly skilled statisticians has developed an

amazing mathematical model for determining how likely a given customer

is to buy a given product by calculating what we call the "suitability

score" "SS".

The top-secret algorithm to calculate the "SS" between a customer and a

product is this:

1. If the number of letters in the product's name is even then the "SS" is

the number of vowels in the customer's name

multiplied by 1.5.

2. If the number of letters in the product's name is odd then the "SS" is

the number of consonants in the customer's name.

3. If the number of letters in the product's name shares any common

factors (besides 1) with the number of letters in the customer's name

then the "SS" is multiplied by 1.5.

Your task is to implement a program that assigns each customer a product

to be offered in a way that maximizes the combined total "SS" across all

of the chosen offers.

Note that there may be a different number of products and customers.

You may include code from external libraries as long as you cite the

source.

Input:

Your program should accept as its first argument a path to a

filename. Each line in this file is one test case.

Each test case will contain a set of comma delimited customer names

followed by a semicolon and then a set of comma delimited product names,

" eg.:"

Jack Abraham,
John Evans,
Ted Dziuba;
Girl Scouts Thin Mints,
Nerf Crossbow
Jeffery Lebowski,
Walter Sobchak,
Theodore Donald Kerabatsos,
Peter Gibbons,
Michael Bolton,
Samir Nagheenanajar;

Half & Half,
Colt M1911A1,
16lb Bowling ball,
Red Swingline Stapler,
Printer paper,
Vibe Magazine Subscriptions - 40 pack

Output:

For each line of input, print out the maximum total score to two decimal

places,

"eg.:"

21.00
83.50
10 years ago
Sorry but I'm not in school. I'm self studying to be a java programmer and had encountered this problem. Since I'm a beginner, I most likely will be wrong in my approach that is why I need expert's here to help me where I go wrong when I compare it to my code.
10 years ago
Hi Guys!

I need a code that works on a sample problem below. I am not a good java programmer and I'm trying to do it too but my solution might be incorrect. You may not use any external libraries to solve this problem, but you may use external libraries or tools for building or testing purposes. Specifically, you may use unit testing libraries or build tools available for your chosen language (e.g., JUnit, Ant, NUnit, Rspec, Rake, etc.)

PROBLEM THREE: MARS ROVERS

A squad of robotic rovers are to be landed by NASA on a plateau on Mars. This plateau, which is curiously rectangular, must be navigated by the rovers so that their on-board cameras can get a complete view of the surrounding terrain to send back to Earth.

A rover's position and location is represented by a combination of x and y co-ordinates and a letter representing one of the four cardinal compass points. The plateau is divided up into a grid to simplify navigation. An example position might be 0, 0, N, which means the rover is in the bottom left corner and facing North.

In order to control a rover, NASA sends a simple string of letters. The possible letters are 'L', 'R' and 'M'. 'L' and 'R' makes the rover spin 90 degrees left or right respectively, without moving from its current spot. 'M' means move forward one grid point, and maintain the same heading.

Assume that the square directly North from (x, y) is (x, y+1).

INPUT:
The first line of input is the upper-right coordinates of the plateau, the lower-left coordinates are assumed to be 0,0.

The rest of the input is information pertaining to the rovers that have been deployed. Each rover has two lines of input. The first line gives the rover's position, and the second line is a series of instructions telling the rover how to explore the plateau.

The position is made up of two integers and a letter separated by spaces, corresponding to the x and y co-ordinates and the rover's orientation.

Each rover will be finished sequentially, which means that the second rover won't start to move until the first one has finished moving.

OUTPUT
The output for each rover should be its final co-ordinates and heading.

INPUT AND OUTPUT

Test Input:
5 5
1 2 N
LMLMLMLMM
3 3 E
MMRMMRMRRM

Expected Output:
1 3 N
5 1 E
10 years ago
Hi Guys!

I need a code that works on a sample problem below. I am not a good java programmer and I'm trying to do it too but my solution might be incorrect. You may not use any external libraries to solve this problem, but you may use external libraries or tools for building or testing purposes. Specifically, you may use unit testing libraries or build tools available for your chosen language (e.g., JUnit, Ant, NUnit, Rspec, Rake, etc.)

PROBLEM TWO: SALES TAXES

Basic sales tax is applicable at a rate of 10% on all goods, except books, food, and medical products that are exempt. Import duty is an additional sales tax applicable on all imported goods at a rate of 5%, with no exemptions.

When I purchase items I receive a receipt which lists the name of all the items and their price (including tax), finishing with the total cost of the items, and the total amounts of sales taxes paid. The rounding rules for sales tax are that for a tax rate of n%, a shelf price of p contains (np/100 rounded up to the nearest 0.05) amount of sales tax.

Write an application that prints out the receipt details for these shopping baskets...
INPUT:

Input 1:
1 book at 12.49
1 music CD at 14.99
1 chocolate bar at 0.85

Input 2:
1 imported box of chocolates at 10.00
1 imported bottle of perfume at 47.50

Input 3:
1 imported bottle of perfume at 27.99
1 bottle of perfume at 18.99
1 packet of headache pills at 9.75
1 box of imported chocolates at 11.25

OUTPUT

Output 1:
1 book : 12.49
1 music CD: 16.49
1 chocolate bar: 0.85
Sales Taxes: 1.50
Total: 29.83

Output 2:
1 imported box of chocolates: 10.50
1 imported bottle of perfume: 54.65
Sales Taxes: 7.65
Total: 65.15

Output 3:
1 imported bottle of perfume: 32.19
1 bottle of perfume: 20.89
1 packet of headache pills: 9.75
1 imported box of chocolates: 11.85
Sales Taxes: 6.70
Total: 74.68
10 years ago
Hi Guys!

I need a code that works on a sample problem below. I am not a good java programmer and I'm trying to do it too but my solution might be incorrect. You may not use any external libraries to solve this problem, but you may use external libraries or tools for building or testing purposes.

PROBLEM ONE: TRAINS

Problem: The local commuter railroad services a number of towns in Kiwiland. Because of monetary concerns, all of the tracks are 'one-way.' That is, a route from Kaitaia to Invercargill does not imply the existence of a route from Invercargill to Kaitaia. In fact, even if both of these routes do happen to exist, they are distinct and are not necessarily the same distance!

The purpose of this problem is to help the railroad provide its customers with information about the routes. In particular, you will compute the distance along a certain route, the number of different routes between two towns, and the shortest route between two towns.

Input: A directed graph where a node represents a town and an edge represents a route between two towns. The weighting of the edge represents the distance between the two towns. A given route will never appear more than once, and for a given route, the starting and ending town will not be the same town.

Output: For test input 1 through 5, if no such route exists, output 'NO SUCH ROUTE'. Otherwise, follow the route as given; do not make any extra stops! For example, the first problem means to start at city A, then travel directly to city B (a distance of 5), then directly to city C (a distance of 4).

1. The distance of the route A-B-C.
2. The distance of the route A-D.
3. The distance of the route A-D-C.
4. The distance of the route A-E-B-C-D.
5. The distance of the route A-E-D.
6. The number of trips starting at C and ending at C with a maximum of 3 stops. In the sample data below, there are two such trips: C-D-C (2 stops). and C-E-B-C (3 stops).
7. The number of trips starting at A and ending at C with exactly 4 stops. In the sample data below, there are three such trips: A to C (via B,C,D); A to C (via D,C,D); and A to C (via D,E,B).
8. The length of the shortest route (in terms of distance to travel) from A to C.
9. The length of the shortest route (in terms of distance to travel) from B to B.
10. The number of different routes from C to C with a distance of less than 30. In the sample data, the trips are: CDC, CEBC, CEBCDC, CDCEBC, CDEBC, CEBCEBC, CEBCEBCEBC.

Test Input:

For the test input, the towns are named using the first few letters of the alphabet from A to D. A route between two towns (A to B) with a distance of 5 is represented as AB5.

Graph: AB5, BC4, CD8, DC8, DE6, AD5, CE2, EB3, AE7

Expected Output:

Output #1: 9
Output #2: 5
Output #3: 13
Output #4: 22
Output #5: NO SUCH ROUTE
Output #6: 2
Output #7: 3
Output #8: 9
Output #9: 9
Output #10: 7
10 years ago

Originally posted by Thomas Paul:
I was just looking at the winners of the last few promotions. I don't think your theory holds up.

That's your opinion and I respect it. But in my opinion, some of them may have enough intelligence and exposure/experience related to it that we might not know of.
M. Sullivan's post explains it best:

"Gregg,
Your missing Claire's point: More experienced people can just pluck questions from the air, meaning they can ask away and really increase their chances to win. Less experienced persons may not ask as many questions, and will have much worse odds at winning.
"

Thru experience, we also gain knowledge. That's why I arrived at that.
Isn't it nice if the book giveaway has the following effect on people who participate:
* People who can't buy expensive books (people in same situation like Kiibati Bankole. Remember her?) have a chance to win. I'm just pro people who can't afford to buy books than people who can buy books but still join the contest just to build their library of books. Sure they may give their time to share their knowledge, but nobody forced them to. And for that we are grateful. Luck will come to them someday in a different form because of their good deeds
* The author can help "another" person that might lead to patronizing his future books due to familiarity or may even recommend the book he/she got for free to a different set of people(serves also as a marketing strategy for the author).
* Someone "new" will be happy because he/she won.
* Active ranchers who posts will feel excited that maybe next promo it's their turn to win and not the same person again.
If those aren't nice, then go ahead and don't amend anything. I am just giving my opinion.
If it's really a "NO" then it's a "NO". It's fine with me. I rest my case . Unless, anybody still wants this post to continue to page 3 and so on, lol , then go ahead .
I already read what the owner and organizer's opinion and those are enough for me. I rest my case and I'll move on too, just like M. Sullivan
Thanks everyone for taking time to reply to this thread, whether it is negative or positive. Sorry for those of you whose blood boiled due to other's opinion / misunderstanding, just because of this one post I started
To the owner, organizers, and other ranchers, keep up the very good work you are doing on this site.
[ March 09, 2004: Message edited by: Claire Fuente ]
18 years ago

Originally posted by Gregg Bolinger:

And yes, as Claire stated, this is the place to voice your concerns, opinions, complaints about Javaranch. But this isn't a suggestion box. The powers that be don't just take all these suggestions and discuss them at the next board meeting. There is only one person, as Ko Ko stated, that really makes the rules. He does take suggestions from his Staff and members but he has the final word.

Hi Gregg!
You previously said above that this isn't a suggestion box. Right? How come this link says:
http://www.javaranch.com
JavaRanch
Just my thoughts
[ March 08, 2004: Message edited by: Claire Fuente ]
18 years ago

Originally posted by David Harvey:

I have been using these forums for years. I've never seen any attempt to install spyware or have noticed any popups (or popunders).

Paid subscription of xsorbit message board has no pop up or ads owned by the company. Only their free plan indicates they can add pop-ups/ads.
18 years ago

Originally posted by Mike Rutgers:
Is there really a fair way of picking winners for the books. Any simple method (which is best, so we don't have to wait until the technology is archaic to find out the winner) has ways around it. For instance, if a rule is made that you have only one chance to win, no matter how many posts, then people will create many memberships with different email addresses (easily done with Hotmail or Yahoo! etc.)

Isn't it users can be tracked by their IP adresses? But I know IP addresses is not constant but it's a way people use to block users.
Anyway, whatever the owner/organizer decided is fine with me. I started this post just out of curiosity and NOT WITH THE INTENT to demand things from the owner / organizer of this wonderful website.
[ March 08, 2004: Message edited by: Claire Fuente ]
[ March 08, 2004: Message edited by: Claire Fuente ]
18 years ago

Originally posted by Thomas Paul:
Nice site. A bunch of annoying popups including an attempt to install known spyware. I think you need a better host.

It's my very first message board . I was inspired by JavaRanch to make it because, like what JavaRanch do, I hope it will also help people . It's only a free messageboard that's why there's a lot of pop-up ads. I hope you come and join so it won't be a boring messageboard
Thanks for taking time to visit it. If anyone here can suggest any free messageboards that are better, let me know so I can switch. Thanks!
[ March 08, 2004: Message edited by: Claire Fuente ]
[ March 08, 2004: Message edited by: Claire Fuente ]
[ March 08, 2004: Message edited by: Claire Fuente ]
[ March 08, 2004: Message edited by: Claire Fuente ]
18 years ago

Originally posted by Gregg Bolinger:

I can't wait for Thomas Paul to see this post.

I just explained the meaning. My intent was not to accuse anybody.
[ March 08, 2004: Message edited by: Claire Fuente ]
18 years ago

Originally posted by Ko Ko Naing:

Hi Claire,
Why don't build up a site that is similar to the Ranch so that you can set up your conditions out there... This is Trailboss(Paul Wheaton)'s site and he is the one who can set up the rules and conditions...

Hi Ko ko!
I just started this post because I thought that the purpose of this category is...
I can set up a site very similar to this if I really want to. But why do I not do it? Simply because, I don't want to compete with JavaRanch as this is one of my favorite(I placed this site on my desktop already for easy access) and I respect the organizers of this wonderful website . I give constructive criticism only to make the site better and more inviting to visit. And I do hope the trailboss will appreciate me taking time to give constructive criticisms.
Maybe you're one of the frequent winners too that's why you don't wanna change the rules, heheh

One of the important rules of the Ranch is "be nice"... So why won't we be nice and try to win books by posting eligible posts? I do believe if you are nice and your posts are eligible to win, you will surely win one day... I suggest you not to be discourage...
All the best...

I am trying my best to post nicely everytime. Haven't you notice how many times I edit most of my posts? hehe
I already tried posting eligible post in the past book promos. (Read above post)
[ March 08, 2004: Message edited by: Claire Fuente ]
[ March 08, 2004: Message edited by: Claire Fuente ]
[ March 08, 2004: Message edited by: Claire Fuente ]
[ March 08, 2004: Message edited by: Claire Fuente ]
[ March 08, 2004: Message edited by: Claire Fuente ]
[ March 08, 2004: Message edited by: Claire Fuente ]
18 years ago