Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

135531208 2/courses/2188-INTRO-COMPUTERS-PROGRAMMING-8.. Problem 2-Write methods Submit a program called directMethods java 1. Create a method called leapYear) that takes an integer (a year) and returns

image text in transcribed
image text in transcribed
135531208 2/courses/2188-INTRO-COMPUTERS-PROGRAMMING-8.. Problem 2-Write methods Submit a program called directMethods java 1. 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 5 method should output true to screen. Create a method called threeNums0) 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); n the main 2. 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 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 f" should be output . The String to screen. Hello

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

Inductive Databases And Constraint Based Data Mining

Authors: Saso Dzeroski ,Bart Goethals ,Pance Panov

2010th Edition

1489982175, 978-1489982179

More Books

Students also viewed these Databases questions