Develop an application to get the licence details from the user , number of licences and compute the total cost

Develop an application to get the licence details from the user , number of licences and compute the total cost
0.0 0

#1

Function Name Description
getLicenceDetails() Create a licenceArray for storing objects. Create a object for each licence detail.
Add each licence details into that array and return it.
populateLicenceDetails() Get the licence array by calling getLicenceDetails() function. Create a select box with id licenceName and set the licence names as option in the select box.
getLicence() Get the licence array by calling getLicenceDetails() function. Set the amount of the licence selected in select box.
compute() Display the total purchased value as shown in screen shot dynamically.

Below is the code, i have attempted but need help as per the screenshot where Name field will be auto populated so as amount and no. of licenses and print as per screenshot, will deeply appreciate for the help
image

code!!!

<html>
<head>
    <style>
    
       
    </style>
    
      
   
    </head>
    <body onload = "populateLicenceDetails()">
                                <!--Fill your code-->
                <center>
                
                <h2>Software License Details</h2>
                <table>
                <tr>
                                <td>
                                Name
                                </td>
				</tr>
				<tr>
								<td>
                                <select id="licenseName">
                                                <option value="null"> select</option>
                                                <option value=getLicenceDetails()></option>
                                </select>
                                </td>
                </tr>
                <tr>
                                <td>
                                Amount
                                </td>
				</tr>
				<tr>
                                <td>
                                <input type="text" id="amount" >
                                </td>
                                
                </tr>
                <tr>
                                <td>
                                Number of Licenses
                                </td>
				</tr>
                                <td>
                                <input type="text" id="quantity">
                                </td>
								                                
                </tr>
                <div id="result"></div>
                </table>
                
                </center>
    </body>
</html>

<script>
function getLicenceDetails() {
	var licenceArray = new Array();
	var licence = new Licence(0,"Select","");
	licenceArray.push(licence);
	var licence = new Licence("123456789abc","Mozilla Public License 2.0",5000);
	licenceArray.push(licence);
	var licence = new Licence("1237X54","Apache License 2.0",15000);
	licenceArray.push(licence);
	var licence = new Licence("A7746771","Eclipse Public License",10000);
	licenceArray.push(licence);
	var licence = new Licence("Z8954554","GNU General Public License (GPL)",20000);
	licenceArray.push(licence);
	var licence = new Licence("9875624X","MIT license",30000);
	licenceArray.push(licence);	
	return licenceArray;
}


function populateLicenceDetails()
{
    //fill code here
}

function getLicence()
{
	//fill code here
}


 function compute()
{



}


</script>