Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Ogero has four different subscription plans for its Internet customers Plan A: For $9.95 per month, 10 hours of Internet access are provided. Additional
1. Ogero has four different subscription plans for its Internet customers Plan A: For $9.95 per month, 10 hours of Internet access are provided. Additional hours are $2.00 per hour Plan B: For $13.95 per month, 20 hours of Internet access are provided. Additional hours are $1.00 per hour Plan C: For $19.95 per month, 40 hours of Internet access are provided. Additional hours are $0.50 per hour Plan D: For $29.95 per month, unlimited Internet access is provided Write a program Ogero.java that asks the user for the plan he/she has purchased (A, B, C or D) and the number of hours that were used, and then displays the totall charges. For example > java Ogero What plan are you subscribed to? A How many hours have you consumed? 2e The total charges:$29.95 You should write a method with the header below that accepts the plan type and the number of hours and returns the total charges: public static double charge(String offer, int hours) 2. Several different formats are used to represent color. For example, the primary format is known as the RGB format, which specifies the level of red (R), green (G), and blue (B) on an integer scale from to 2SS. The primary format for publishing books and magazines, known as the CMYK format, specifies the level of cyan(C), magenta (M), yellow (Y), and black (K) on a real scale from . to 1.8. Write a program, RGBtoCHYK.java that converts RGto CMYK. Specifically, the program should ask the user to enter the R, G, and B values, respectively, then print the equivalent CMYK values based on the following formulas: whiteL cyan-white/white magenta = (white-gren.) /white 5/white . black 1-white Sample Run >java RGBtoCHYK Please enter RGB values: 75 138 RBG (75, 0, 130) CMYK (0-4230769230769229, 1.0, 0.0, 0.4901960784313726) Write a program RandomString.java that prompts the user for a positive integer N and a string (N is assumed to be smaller than the length of the string). The program should pick N random characters from the string and construct and print a new string composed of these random characters. Notes you are not allowed to generate a selected character more than once. Sample Run >java RandonString Please enter N: 3 Please enter a string: abcdefghij fbh
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started