Campbell Ritchie wrote:Afraid that is a bad idea. The volume isn't anything to do with the Main class (I think that is a bad name, but that't something unrelated), nor is it a feature of a Radio class. It should be a feature of a Radio object, so it shouldn't be static.
Emir Rayhan wrote:. . . volumeUp() will be declared in Main class.
Carey Brown wrote:This means you have an array of 5 volumeControls. Do you want to loop through these to find out the max volume that is set?
Emir Rayhan wrote:
Can you explain what you are trying to do with volumeUp() ?
Carey Brown wrote:Computing the max value in an array involves a simple for loop to visit each element. Show us what you've tried so far.
Not sure why you tossed in volumeUp() method. Where does that fit in to your requirements? I'm surprised to see this method implemented as "static". Is this a "master" volume control?
Campbell Ritchie wrote:The Java™ Tutorials are the most comprehensive resource I have seen, but they use the old technique of putting code in the main method. That was the most convenient way to run a block of code as such before JShell, but it doesn't teach OO programming. I have never seen a really good tutorial on line.
Paul Clapham wrote:
Emir Rayhan wrote:My question is, what is the concept of the validation?
That's my question too. It seems that you want to validate the e-mail address which was sent from the client side somehow, but I don't see anything which tells me what validation you want to do. If you had something in mind, then by all means tell us what you need to check for. However if your question is "Should I validate an e-mail address?" then my answer would be "No." Not unless you have some limitations like "It has to be an e-mail address belonging to my company". Otherwise the user's e-mail address is what they say it is and you don't really have any business rejecting it.
Paul Clapham wrote:
Emir Rayhan wrote:Yes the HTML and CSS works properly. Although, it did not show the end result i esxpected when i run the file.
And did you look at the page source in the browser to see if the JSP had been included as you expected? Or use the browser's tools which allow you to inspect elements and the CSS used to render them?
Ron McLeod wrote:
When I render your markup on my browser, I see this:
Are you expecting it to show as something like this?:
Paul Clapham wrote:T
Have you already established that the HTML and CSS works correctly, except when you include it from JSP it doesn't work correctly?