Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 2 - directMethods.java elearn.uta.edu SIDEMEN DRUN Course Materials... https://elearn.ut... Favorites directMethods.ja... The top and bot... Chegg Study G... Problem 3-Write.. Chegg Problem 2-Write methods

Problem 2 - directMethods.java

image text in transcribed

elearn.uta.edu SIDEMEN DRUN Course Materials... https://elearn.ut... Favorites directMethods.ja... The top and bot... Chegg Study G... Problem 3-Write.. Chegg Problem 2-Write methods Submit a program called directMethods.java Create a method called leapYear() that takes an integer (a year) and returns true if the year is leap year and false if it is not. For example, a line of code like System.out.printin(leapYear(2020)); in the main method should output true to screen 1. 2. Create a method called threeNums() that takes a String parameter of three integers, separated by a dash -. The method should return true if they are in increasing order (from left to right) and false otherwise. For example, a line of code like System.out.printin(threeNums("10-20-40")); in the main method should output true to screen. 3. Create a method called printOut() that takes an integer parameter, a char and a String and prints out a box using the given char. The top and bottom part of the box should have as many chars as the integer parameter given and the sides of the box should be half of the integer parameter given. The String given should be printed in the middle of the box. For example, a line of code like printout(10, Hello"); in the main method should output to screen the box given below. If the String given is longer than the integer given or the integer given is not an even number, "Can't print this:("should be output to screen. Hello Create a main method using these methods. Your main method should only contain three lines System.out.printin(leapYear(2020)); System.out.println(threeNums("10-20-40")); printOut(10,'", "Hello"): 4

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

Step: 3

blur-text-image

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

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

Students also viewed these Databases questions

Question

What is the basis for Security Concerns in Cloud Computing?

Answered: 1 week ago

Question

Describe the three main Cloud Computing Environments.

Answered: 1 week ago