Programming Fundamentals

 

 

 

 

 

Revise Listing 3.8, Lottery.java, to generate a lottery of a three-digit integer. The program prompts the user to enter a three-digit integer and determines whether the user wins according to the following rules:
• If the user input matches the lottery number in the exact order, the award is $10,000.
• If all digits in the user input match all digits in the lottery number, the award is $3000.
• If one digit in the user input matches a digit in the lottery number, the award is $1000.
Your program’s output should look like the sample shown below. Green text represents information entered by the user. Black text is produced by the program.
Enter your lottery pick (three digits): 768
Lottery is 723
Match one digit: you win $1,000

Store the source code in a file named Lottery<your_name>.java. For example, your instructor’s source code would be stored in a file named LotteryPeggyDoerschuk.java. In comments at the top of the source code file place the following:
<Alex John>
COSC 1336

 

 

Sample Solution

The Poem of Beowulf Beowulf’s verse is a story composed toward the start of Christianity 1000 years prior. That is the reason there are heaps of allurements and Satan in the story. Beowulf was composed by an unknown Christian priest. This story occurs in the present Denmark that occurs in a little realm called Hello “Gulch”. The tale of Beowulf tells a totally extraordinary principle character with some other legend in antiquated writing. Since not at all like Oxeus, in contrast to Achilles, they have to endure. Seamus Heaney’s artist Beowulf delineates Beowulf as an ideal legend. Beowulf was the child of Edgetho’s fantasy and later became lord of Geats. In this sonnet, Beowulf indicated courage in two phases of his life, youth and mature age. In the entire sonnet, Beowulf is defied with three troublesome clashes between Glendell, the mother of Glendell, and the mythical serpent. In the entire novel, Beowulf is a renowned and regarded warrior from Geatland. In Beowulf’s childhood, he was viewed as an incredible warrior drawn by his quality, boldness and mental fortitude. In the whole epic “Beowulf”, the fundamental character Beowulf endured three major battles. Each fight is a great trial of his quality. As verse and Beowulf ‘s progress experienced various things, his character experienced huge changes just as his purposes behind fight. His first battle was against Monster Glenn who was scaring the Kingdom of Herrosga for quite a while. At that point he battled with Glendell’s mom who was looking for vengeance for Beowulf to execute her child. His last battle was against the winged serpent he took a stab at vindicating the individuals of the town to take his fortune. Every one of these battles is because of totally various reasons, and each game bigly affects his life and character. Beowulf initially battled against the beast Glendell. Glendell is surrendered by society and is irate with Herrot’s singing and celebrating. Glendell executed numerous ruler warriors while dozing.

This question has been answered.

Get Answer
WeCreativez WhatsApp Support
Our customer support team is here to answer your questions. Ask us anything!
👋 Hi, Welcome to Compliant Papers.