This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 15-100 PROGRAM 4 - FALL 2007Due: Monday, October 1 by 11:59PM using electronic hand-in BACKGROUNDBali is a popular word game published in the 1950's that plays as follows. A player makes a word using letter cards. The score for the word is based on the letters used and the number of letters in the word. Each letter is scored as shown in the table below: A,E,I,O,U0 points each C,D,G,H,L,N,P,R,S,T1 point each B,F,M,Y2 points each K,V,W3 points each J,Q,X,Z4 points each *5 points NOTE: The * represents a wild card. There is only one wild card in the deck. The total score for the word is the sum of the scores for the letters in the word multiplied by the length of the word. For example, BANKearns a score of (2 + 0 + 1 + 3) ×4 = 24 points.COMP*TEearns a score of (1 + 0 + 2 + 1 + 5 + 1 + 0) ×7 = 70 points. ASSIGNMENT Write a complete Java program with a class named BaliScorerthat contains a mainmethod asks the user for a word and outputs the score for the input word using the rules for Bali. Your program should repeat this 5 times and output the total accumulated score for Bali....
View Full Document
- Fall '07
- bank Bank, input word