A good website has the following conditions

It should be interactive.
It should contain at least 20 images.
Title cannot be null and should contain at least 10 letters
other than spaces and hyphen (-).
The keywords should contain atleast three among the
following list : "design", "Graphics", "lovely",
"beautiful", "amazing" and "mesmerising"
Write a method:


boolean isGoodWebsite(boolean isInteractive, int
numOfImages, String title,String keywords[])

isInteractive whether the site is interactive or not
numOfImages Number of images on the website
title Title of the website
keywords Array of keywords in the website.



A good website has the following conditions It should be interactive. It should contain at least..

Answer / Pran Mohan Mishra

Here's an example Java code for the method: (Note: This is not JSON format as it cannot be executed)nn```javanpublic class GoodWebsite {n public boolean isGoodWebsite(boolean isInteractive, int numOfImages, String title, String[] keywords) {n if (!isInteractive) return false;n if (numOfImages < 20) return false;n if (title == null || title.length() < 10) return false;n for(int i=0; i<keywords.length && i<3; i++) {n if (!Arrays.asList("design", "Graphics", "lovely", "beautiful", "amazing", "mesmerising").contains(keywords[i])) return false;n }n return true;n }n}n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Programming Languages AllOther Interview Questions

Write a program to create a process in UNIX

1 Answers  


hai i am prasanna.I am MCA 2009 fresher.tell me about certifications.which certification helps me to improve my carrier and to get a technically oriented job ,which certification helps to get job faster.

1 Answers  


A, B and C are 8 bit nos. They are as follows: A 1 1 0 1 1 0 1 1 B 0 1 1 1 1 0 1 0 C 0 1 1 0 1 1 0 1 Find ( (A-B) u C )=? how to solve this need with steps

5 Answers   TCS,


How to merge Action Form with Dyna Action Form in Struts.

1 Answers  


Write a shell program where you enter a number which corresponds to K.M. Find out the corresponding values in m, cm, inches, and feet. Hints:- 1 k.m= 1000 m 1 m= 100 cm 1 inches= 2.54 cm. 1 feet= 12 inches

1 Answers  


Given a arbitrary pointer to an element in a singly linked list?what is the time complexity for its deletion .

1 Answers   Hughes,


Which tag is used to break a line

3 Answers  


How can you incorporate a Datawindow to a Oracle8i stored procedure?

0 Answers   IBM,


smal talk is pure object oriented or not?

1 Answers  


Wrtite a JCL for sorting a file with start from 36 postion lenth 9 excluding a num eq to 98768. for 3 marks mainframe

1 Answers  


Given an array of size n. It contains numbers in the range 1 to n. Each number is present at least once except for 1 number. Find the missing number

1 Answers   Amazon,


Where do we need Operator overloading?

1 Answers   BirlaSoft,


Categories