Question: please use java Problem 1Software Sales Discount A software company sells a package that retails for $99. y discounts are given according to the following
Problem 1Software Sales Discount A software company sells a package that retails for $99. y discounts are given according to the following table: 1 of 2 Discount 20% 20-49 30% 50-99 40% 100 or more 50% Write a Java class named Discount that asks the user to enter the number of packages purchased. The program should then display the amount of the discount (if any) and the total amount of the purchase after the discount Outputs: Please enter the number of packages you purchased: 5 Total amount of purchase would be: $495.00 Please enter the number of packages you purchased: 30 Total amount of purchase would be: $2079.00 Problem 2: Lottery (Lottery.java) This program models a lottery game, in which a system will generate a random two-alphabet-letter (all in uppercase) lottery string, and the user can play the game by matching their lottery string against the system generated lottery string Suppose your chosen lottery string is: AF (the first letter is 'A' and the second letter is "F"). A match will be detected then to determine the award of the user. The matching rule says that: . If match with the exact order: award 10000 If match two letters (but not in the same order): 3000 If match one letter: 1000 If no match at all: 0 Write a Java class named Lottery to implement this game. Display the award gained by the user. Outputs: Your lottery is: AF The Lottery generated is: FA You win $3000! Your lottery is: AF The Lottery generated is: DA You win $1000
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
