Question: please answer all parts! There is a Main class with 7 methods. Methods are called etc. The body of each method has comments that explain

please answer all parts!
please answer all parts! There is a Main class with 7 methods.
Methods are called etc. The body of each method has comments that
explain what the method needs to return. Your job is to write
code to make sure it returns the correct value. There are tests

There is a Main class with 7 methods. Methods are called etc. The body of each method has comments that explain what the method needs to return. Your job is to write code to make sure it returns the correct value. There are tests you can run that will verify your method is working properly. Your grade will be determined by how many tests you pass. Each test or question is worth 10 points, for a total of 70. I/ you do need to change the return line though public String question3(int dayNum) \{ II Given a day number (1-7), return the day of the week ("Sunday", "Monday", // etc.). If an invalid day number is provided, return "Invalid". I/ Examples: I/ dayofweek(1) "Sunday" II dayofweek(4) "Wednesday" return "Invalid"; // you need to change this line public int question4(int tea, int candy) } II Write a function in Java that implenents the following logic: We are having a II party with amounts of tea and candy. Return the int outcome of the party II encoded as = bad, 1=good, or 2=great. A party is good (1) if both tea I/ and candy are at least 5. However, if either tea or candy is at least double 1/ the amount of the other one, the party is great (2). However, in al1 cases, 1/ if either tea or candy is less than 5 , the party is always bad (). return ; // you need to change this 1ithe public boolean questions(int a, int b, int c, boolean bok) \{ // Write a function in Java that implements the following logic: Given three I/ ints, a,b, and c, return true if b is greater than a, and c is greater than // b. However, with the exception that if bOk is true, b does not need to be // greater than a. I/ Note 'bok' is the name of an formal parameter. I/ b. However, with the exception that if bok is true, b does not need to be II greater than a. // Note 'bOk' is the name of an formal paraneter. return false; // you need to change this line public boolean question6(int n, boolean outsideHode) \{ I/ Write a function in Java that implenents the following logic: Given a number I/ n, return true if n is in the range 1..10, inclusive. Unless "outsidewode" is I/ true, in which case return true if the number is less or equal to 1 , or return false; // you will need to change this line public boolean question7 (int date, int month, int year) f I/ A magic date is one when written in the following format, the nonth tines the II date equals the year e.g. 6/10/60. Write code that figures out if a user II entered date is a magic date. The dates must be between 131, inclusive and II the months between 112, inclusive. Let the user know whether they entered II a magic date. If the input parameters are not valid, return false. // Examples: I/ magicDate (6,10,60) true I/ magicDate (50,12,600) false return false; // you will need to change this line

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!