1) When your project begins execution, you should read the input file line by line. Feel free to use the Scanner class.

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

1) When your project begins execution, you should read the input file line by line. Feel free to use the Scanner class.

Post by answerhappygod »

1 When Your Project Begins Execution You Should Read The Input File Line By Line Feel Free To Use The Scanner Class 1
1 When Your Project Begins Execution You Should Read The Input File Line By Line Feel Free To Use The Scanner Class 1 (186.66 KiB) Viewed 49 times
CVS FILE:
What do you mean you need more of an "idea/n" ?
1) When your project begins execution, you should read the input file line by line. Feel free to use the Scanner class. Each line represents a card and has a 1 in 6 chance of making it into your deck, otherwise just discard it. Java's Random class can help with this. After reading the input file, you should have a deck of Tarot cards. 2) Ask the user for a number between 1 and 7. Draw that many cards, this is their HAND. If the first card drawn is an odd number, or you are unable to draw that many cards, this is BAD LUCK. 3) Print out the final card drawn, this is the user's FORTUNE CARD. 4) Now, we want to predict if the user is going to have good luck today using the following algorithm, mean magic. a. Take the sum of each drawn card's id. b. If the user has BAD LUCK, then subtract 50 from the sum. If the result is greater than 100, the user is going to have a GOOD HAIR DAY C. i. Otherwise, they are going to have a BAD HAIR DAY Print a message depending on whether they will be having a GOOD or BAD HAIR DAY. d. first is Input: The input tarot.csv contains rows, with each row representing a card containing 2 values, an ID number, and the second is the name of the card. Output: Print the appropriate message predicting whether the user is going to have good hair today. For example: Hmm.. your card is Page of Swords... How lucky! Looks like you are going to have a good hair day! or Hmm.. your card is Four of Wands... You might want to wear a hat today For more information, please see Chapter 15-18 Concepts Covered: OOP, data structures, linked-lists, stacks, files, strings, algorithms, Java, Random, dark magic? Please reach out to me with any questions.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply