Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Could some one show me exactly how to get this setup in Netbeans correctly... an

ID: 3917317 • Letter: C

Question

Could some one show me exactly how to get this setup in Netbeans correctly... and two...There is also a javadoc requirement for the Java application projects developed in the course. All Java projects must also contain javadoc documentation with it when submitted. There is an option to create javadocs in NetBeans. As long as you have your code commented properly, the javadoc will be automatically generated when you selected the option to generate it in NetBeans. What is that referring

https://www.chegg.com/homework-help/questions-and-answers/create-name-tune-type-program-five-questions-program-play-short-sound-clip-screen-ask-user-q26752119

Create a “name that tune ” type program with five questions. Your program should play a short sound clip, then on the screen, it should ask the user to enter the name of the song or pick the song from a menu. The exact format of the game and the program is up to you, but the user should be given five sound clips to identify, one at a time, with a score at the end.

Expert Answer

Was this answer helpful?

1

0

93 answers

namethatgame.html

<!DOCTYPE html>

<html>

<head>

<title>Name That Tune</title>

<style>

body{background-color:black;color:#3399cc;font-size:30px;font-family:comic sans ms;}

select{background-color:green;color:white;font-family:georgia;font-size:25px;border:2px solid orange;border-radius:10px;}

button{border:2px solid orange;background-color:white;color:skyblue;font-size:25px;border-radius:10px;}

h1{border-bottom:3px solid orange;color:white;border-top:3px solid red;border-right:5px solid white;border-left:5px solid white;}

</style>

</head>

<body>

<audio id="song" src="" autoplay="true" type="audio/mpeg">

</audio>

<center>

<div>

<h1>Name That Tune</h1>

<br/><br/><br/>

<div id="question">

<button>Play</button>

</div>

<br/><br/><br/><br/><br/>

</div>

</center>

</body>

</html>

<script>

var score=0;

var s = document.getElementById("song");

var q = document.getElementById("question");

//options in menu

var options="<option value='s1'>Song1</option><option value='s2'>Song2</option><option value='s3'>Song3</option><option value='s4'>Song4</option><option value='s5'>Song5</option>";

//Question

var q1="Pick the correct song from the menu";

function q_s1(){

s.src="ring1.mp3";

q.innerHTML="Song1 is Playing...";

s.onended = function() {

q.innerHTML=q1+"<br/><select id='a1'>"+options+"</select><button>Next-></button>";

};

}

function q_s2(){

var a=document.getElementById("a1").value;

if(a=="s1")

{

score=score+1;

}

q.innerHTML="Song2 is Playing...";

s.src="ring2.mp3";

s.onended=function(){

q.innerHTML=q1+"<br/><select id='a2'>"+options+"</select><button>Next-></button>";

}

}

function q_s3(){

var a=document.getElementById("a2").value;

if(a=="s2")

{

score=score+1;

}

q.innerHTML="Song3 is Playing...";

s.src="ring3.mp3";

s.onended=function(){

q.innerHTML=q1+"<br/><select id='a3'>"+options+"</select><button>Next-></button>";

}

}

function q_s4(){

var a=document.getElementById("a3").value;

if(a=="s3")

{

score=score+1;

}

q.innerHTML="Song4 is Playing...";

s.src="ring4.mp3";

s.onended=function(){

q.innerHTML=q1+"<br/><select id='a4'>"+options+"</select><button>Next-></button>";

}

}

function q_s5(){

var a=document.getElementById("a4").value;

if(a=="s4")

{

score=score+1;

}

q.innerHTML="Song5 is Playing...";

s.src="ring5.mp3";

s.onended=function(){

q.innerHTML=q1+"<br/><select id='a5'>"+options+"</select><button>Next-></button>";

}

}

function results(){

var a=document.getElementById("a5").value;

if(a=="s5")

{

score=score+1;

}

q.innerHTML="Calculating you result...";

q.innerHTML="Your Score<br/><button>"+score+"</button>";

}

</script>

Explanation / Answer

namethatgame.html

<!DOCTYPE html>

<html>

<head>

<title>Name That Tune</title>

<style>

body{background-color:black;color:#3399cc;font-size:30px;font-family:comic sans ms;}

select{background-color:green;color:white;font-family:georgia;font-size:25px;border:2px solid orange;border-radius:10px;}

button{border:2px solid orange;background-color:white;color:skyblue;font-size:25px;border-radius:10px;}

h1{border-bottom:3px solid orange;color:white;border-top:3px solid red;border-right:5px solid white;border-left:5px solid white;}

</style>

</head>

<body>

<audio id="song" src="" autoplay="true" type="audio/mpeg">

</audio>

<center>

<div>

<h1>Name That Tune</h1>

<br/><br/><br/>

<div id="question">

<button>Play</button>

</div>

<br/><br/><br/><br/><br/>

</div>

</center>

</body>

</html>

<script>

var score=0;

var s = document.getElementById("song");

var q = document.getElementById("question");

//options in menu

var options="<option value='s1'>Song1</option><option value='s2'>Song2</option><option value='s3'>Song3</option><option value='s4'>Song4</option><option value='s5'>Song5</option>";

//Question

var q1="Pick the song from the menu";

function q_s1(){

s.src="ring.mp3";

q.innerHTML="Song is playing";

s.onended = function() {

q.innerHTML=q1+"<br/><select id='a1'>"+options+"</select><button>Next-></button>";

};

}

function q_s2(){

var a=document.getElementById("a1").value;

if(a=="s1")

{

score=score+1;

}

q.innerHTML="Song2 is Playing...";

s.src="ring1.mp3";

s.onended=function(){

q.innerHTML=q1+"<br/><select id='a2'>"+options+"</select><button>Next-></button>";

}

}

function q_s3(){

var a=document.getElementById("a2").value;

if(a=="s2")

{

score=score+1;

}

q.innerHTML="Song3 is Playing...";

s.src="ring3.mp3";

s.onended=function(){

q.innerHTML=q1+"<br/><select id='a3'>"+options+"</select><button>Next-></button>";

}

}

function q_s4(){

var a=document.getElementById("a3").value;

if(a=="s3")

{

score=score+1;

}

q.innerHTML="Song4 is Playing...";

s.src="ring4.mp3";

s.onended=function(){

q.innerHTML=q1+"<br/><select id='a4'>"+options+"</select><button>Next-></button>";

}

}

function q_s5(){

var a=document.getElementById("a4").value;

if(a=="s4")

{

score=score+1;

}

q.innerHTML="Song5 is Playing...";

s.src="ring5.mp3";

s.onended=function(){

q.innerHTML=q1+"<br/><select id='a5'>"+options+"</select><button>Next-></button>";

}

}

function results(){

var a=document.getElementById("a5").value;

if(a=="s5")

{

score=score+1;

}

q.innerHTML="Calculating you result...";

q.innerHTML="Your Score<br/><button>"+score+"</button>";

}

</script>