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.
Answer Posted / 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 View All Answers
hi, all this is shoba m.c.a . i have learned abap but no oppurtunities right now as fresher , right now i want to learn any course on demand any one pls suggest me good course and institute in hyderabad
How to get the index of the clicked field in reports in ABAP?
Compare any 4 software development life cycle paradigms with each other. Indicate at least one application for each of the paradigms that are suitable to developed using that paradigm.
Hi Guys, This is Rama, right now I am working as a Software Test Engineer in Gurgoan and I have over all 3 years of testing expoeriance. Right now I am looking for a change. Can any body help me out to find a job in south india. Thanks in Advance
I am taking the bmc control m/enterprise manager 7.0 scheduling test and just wanted to see what kind of questions they would ask or if anyone has taken the test and how long it is for how many questions?
what is the diff bw sql direct and jdbc update can't we do select and updating operation in sql direct
Bonjour, svp je veut voir comment envoyer un mail en java et comment changer le droit d'accé d'un fichier en java: de lecture en lecture/écriture et merci d'avance ;)
hi This is radhika.Can anyone help me to know the question papers of NATIONAL INFORMATICS CENTRE for the post of scientific officer/engineer? if anyone know plz tell me question paper pattern
please any one pass file aid,xpeditor and endeavor tools
I want sample papers for NIC Examination. Plz send them to my mail Id das.neelam@gmail.com . Plz send it today, tomorrow i've the exam.
can we extend a class having only one parameterised constructor.Suggest the process to do it.
If u need any fake experience certificate in software side, contact me at: vikramyadhav@gmail.com
Mainly Related to Oracle, DBMS , Oracle Stored Procedures, Functions, Oracle 9i Architecture, Redo logs..., Views,
Please forward important interview and basic questions in VB6 on my email id: usneha_16@yahoo.co.in
Explain the types of operations? Draw the figure for shift and rotate operations?