Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

- Create a documentation for your code. - Include comments in your code. - Upload your .java file for each problem. - Use the


image text in transcribedimage text in transcribedimage text in transcribed

- Create a documentation for your code. - Include comments in your code. - Upload your .java file for each problem. - Use the textbook or Google when you need help. As of now, the following rules will apply strictly. 1. Add a program summary on top of your code. 2. Put proper comments. - Exception: 5-min recordings and interview - You still need them for submission. 3. Include documentation at the bottom of your code. 3. Cite the source of your information. 4. Don't put anything in your code if you don't understand 100%. 1 80 points 5-min challenge: you will get full credit after you reproduce your work with IntelliJ in class/interview. Calculate and print out the multiplication of two numbers taken from a user a. Minimize main() as much as possible. b. Use three methods: userInput(), calculation(), printout() c. Explain while you are recording. *Do not edit your recordings. The act of editing is considered a form of cheating. Sample output ? 3.7 11.5 2 3.7 x 11.5 = File name 40 points J106_1.java J106_1.png YouTube link Analyze/trace the code. a. Insert line numbers. https://bit.ly/3DMjFxN b. Use your sample data. import java.util.Scanner; public class analyze This { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("? "); } int yy = input.nextInt(); System.out.print("? "); int mm = input.nextInt(); printmm(yy, mm); public static void printmm(int yy, int mm) { printmmTitle(yy, mm); printmmBody(yy, mm); } public static void printmmTitle(int yy, int mm) { System.out.println(" System.out.println(". + getmmName (mm) + + yy); -"); System.out.println(" Sun Mon Tue Wed Thu Fri Sat"); } public static String getmmName (int mm) { String mmName = ""; switch (mm) { } case 1: mmName = "January"; break; case 2: mmName = "February"; break; case 3: mmName = "March"; break; case 4: mmName = "April"; break; case 5: mmName = "May"; break; case 6: mmName = "June"; break; case 7: mmName = "July"; break; case 8: mmName = "August"; break; TIX } case 9: mmName = "September"; break; case 10: mmName = "October"; break; case 11: mmName = "November"; break; case 12: mmName = "December"; return mmName; public static void printmmBody(int yy, int mm) { int sDay = getSDay (yy, mm); int numberOfDays Inmm = getNOfDInmm (yy, mm); int i = 0; for (i = 0; i < sDay; i++) System.out.print(" "); for (i = 1; i public static int getNOfDInmm (int yy, int mm) { if (mm == 1 || mm == 3 || mm == 5 || mm == 7 || mm == 8 || mm == 10 || mm == 12) } return 31; if (mm == 4 || mm == 6 || mm == 9 || mm == 11) return 30; if (mm == 2) return is Leapyy (yy) ? 29 : 28; return 0; public static boolean isLeapyy(int yy) { } return yy % 400 == 0 || (yy % 4 == 0 && yy % 100 != 0); J106_2.java File name J106_2.docx 3 20 points How long would it take for your $100,000 principal to double ($200,000) if you add 3% of what you have each month. 1. Show the amount for each month 2. Minimize main() as much as possible. 3. Use your own methods. Sample output File name J106_3.java J106_3.png 60 points Write a code that checks a user input is a palindrome. Create a method for each task below: a. Get rid of all punctuation marks in the input string. b. Get rid of all blank spaces in the string. c. Reverse the order of the string. d. Compare the reversed string with the original string. e. Print out the decision. *Submit the screenshot of your output with a "smart" sample data. Sample output File name J106_4.java J106_4.png

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions