Create
Learn
Share

JS part 2

rename
kojigabriel's version from 2017-05-08 17:05

More than basic

Question Answer
the this function takes the inputted hourly wage and multiplies it<input type="text" id="txtHours" size="3" /> <input type="text" id="txtHourlySalary" size="8" /> <input type="button" value="Calculate" onclick="showGrossSalary()" />


function calculateSalary(hours, hourlySalary) { return hours * hourlySalary; } function showGrossSalary() { var totalhours = document.getElementById('txtHours').value; var hs = Number(totalhours); var wages = document.getElementById('txtHourlySalary').value; var h = Number(wages); var Shite = calculateSalary(h, hs); document.getElementById('divOutput').innerHTML = Shite;
this function runs the inputted number seven times. on each run, the input number is calculated from the previous number and printed. the current weight variable is deducted per turn.function showWeightGoals() { var originalWeight = Number(document.getElementById('txtWeight').value); var currentWeight = originalWeight; var outputText = ""; var weeklyLoss = originalWeight * 0.1 / 7; for (var i = 1; i <= 7;i++) { currentWeight = currentWeight - weeklyLoss; outputText = outputText + "After " + i + ". week weight is " + currentWeight.toFixed(1) + "kg"+"
"; } document.getElementById('pOutput').innerHTML = outputText;
this takes the information from the array by accessing it using value pairs. notice how the array is only having one {]var student = {number: "a1234567", firstname: "Pekka", lastname: "Virtanen", address: "Virtakatu 11 12345 Virtala", dob: "24.12.1990" }; // INSERT YOUR CODE HERE document.getElementById("divOutput").innerHTML = "Student Number: "+student.number + "
Name: " + student.lastname + " " + student.firstname + "
Address :" + student.address + "
Date of Birth: " + student.dob;
In the following array, the object literals must be parsed before it can be indexed. the parsed index becomes a variable. then the indexes can be printed with a for loop in ordervar coursesJsonText = '[{ "name": "Orientation to Software Engineering", "code": "SWD1TF001", "extent": "5", "timing": "1 semester" },{ "name": "Programming", "code": "SWD1TF002", "extent": "5", "timing": "2.semester" }, { "name": "Data management and databases", "code": "SWD1TF003", "extent": "5", "timing": "2.semester" }, { "name": "Mobile development project", "code": "SWD1TF004", "extent": "10", "timing": "3.semester" }]'; var courseArrayObject = JSON.parse(coursesJsonText); for (var i = 0; i < courseArrayObject.length; i++) { document.write("Code: " + courseArrayObject[i].code + "
" + "Name: " + courseArrayObject[i].name + "
" + "Extent: " + courseArrayObject[i].extent + "
" + "Timing: " + courseArrayObject[i].timing + "
" + "
")
memorize

Development

Question Answer
What is requirements analysis?Requirement Analysis is evaluating what needs or lawful requirements the program should meet. Includes needs of the business, regulatory bodies. This is part of the Waterfall Development method, which Requirement Analysis is done before the Design phase of the project. Any forthcoming phase of the project must check in with the requirements in order to be effective.
Who are involved in requirements analysis?Depends on the development method, however it can Project Manager, Quality Assurance (tester), Security Manager and/or UX specialist. The Project Manager can be put in check by upper management of the business to ensure that the business needs are being met throughout the development process. The Quality Assurance or Tester can be also testing the programming throughout the life-cycle and communicate with the Project Manager. UX specialist can view the overall picture of the program to see if all the requirements are communicated effectively through the design of the program.
How is an application designed? An application is designed with raw programming with developers in accordance to a development lifecycle, such as Agile, Waterfall or any iterative method common these days. The application development goes through certain phases with specific roles that are involved in those steps. The physical design of the application, apart from raw programming can be evaluated with a usability or UX specialist who is trained into determining the layout, presentation, psychology and understanding the end users need for the product. The UX specialist can be in communication with the project manager to also evaluate layout or interface of the product.
What kind of documents should be produced?Depends on the application or business needs. Some applications need to produce or input raw data into tables which the server can store and be retrieved later for analysis or business operations.
How is working software implemented? Working software is implemented using development life cycles of course. However, it also must be coded correctly, be in communication with the server where it can retrieve/send data. The software must also have an interface that can be navigated effectively and that expresses the coded software in an effective manner. The software must also be in line with business needs and be safe from intrusion, however the hard coding and raw programming must be implemented correctly.
What kind of tools and technologies can be used? Tools that can be used is tools for languages such as JavaScript, HTML, Python, XML, CSS. There are also tools for server maintenance, processes and storage. Networking is also part of the physical implementation of software from server to client.
What is testing? Testing is evaluating how functional the program that is being designed is. It looks at the code that is provided, and measures if what is written in the code is being conducted. It can be also done to evaluate how it fits into the picture of the business environment.
What kind of different types of testing will occur during different phases of the development? There is testing for requirement analysis, for usability, for coding, layout, usability, for server maintenance, networking.
Why do we test in those phases?In order to evaluate that the software is meeting the original goals and needs of the project, and business vision.
What kinds of activities are involved when a new software version is released? The kind of activities that are involved when new software version is being released could perhaps be short development life cycles. The requirements are evaluated, and short cycles called sprints which can be a few weeks time are done. After the sprint is done, the usability and requirements are revisited, and then a new requirement is analyzed for feasibility. The sprint can continue again At some point the development can be frozen, then evaluation is done in coordination with management to see if that version of the software meets all the needs. Once its a go, than the new software version is released to the client for update with any new features that may be available or bug fixes.
What kind of impulses cause change needs for the working application?The kind of impulses that can trigger needs for change is perhaps a new trend in customer needs, forecasted usuability needs or a new strategy that a business would like to develop.
What is a waterfall model (vesiputousmalli)? The Waterfall model is a development method for applications. It was developed when software development was much simpler, it includes several steps which are: Requirements: assessing the software and that it meets all requirements or vision that that software is intended for. this include business needs or lawful regulations. Design: This is where the software is designed, including usability, coding, and any programming. Implementation: this step has to do with launching the software. Verification: this step revisits the launched software and makes sure that it has met all the needs and that the software was programmed as intended. Maintenance: includes fixing any bugs or updating the software based on changing business needs. This model is usually very heavy in the planning stage and the coding can only come later. It is known for focus on launching the software based on the business timeline in order to meet deadline, but could be prone to programming errors or bugs.
What is Agile?The agile development method is used for more programming focused development, rather than being bogged down by arduous planning stages or needs analysis for the business. In this model, the program development is organized into smaller increments, which are handled by teams of developers. This allows more focus on effective programming and higher quality assurance. The project manager is always in communication with upper management, however with the incremental development it becomes much easier to make sure the software is tested and implemented properly. (Requirements, Plan, Design, Develop, Release, Track and Monitor)
What is Scrum? Scrum is a development method which focuses on maintenance and implantation based on priority. It is ideal for a program that is already released and has a backlog of enhancements or changes that are due. Scrum developments are also organized into teams, with a Scrum master making sure that every step is followed through and that the priority backlog is being met. The Scrum teams implement their coding, testing and analyzing in sprints, which are a duration of a few weeks. Meetings are also organized during this time to assess current, or future developments.
What is Kanban? Kanban development is focused on development using visual boards for assessing the need for development steps. Typically the board will organized into columns that entail a development process, and that column will have a limit on the number of development processes that are occurring at any given time. This is to make sure that resources, such as management, coders, testers or whatever staff is needed for that process are not being strained. The development will go through the steps until it gets to the final column, which is "complete"- There are columns for business analysis, coding, testing, implementation, maintenance and more. The first column is based on what is desired to be implemented, but not started yet.
What is lean? Lean development originates from Toyota manufacturing, and is focused in providing quality, speedy implementation and customer satisfaction. It is often used with Agile development. Lean focuses on only using resources of software that is of value or priority. It includes discarding evaluation for business needs, programming or any stage that is taking time away that could be used in an effective manner. It removes the need to focus on future developments which may or may not change due to the market. The focus is here and now. It avoids multitasking as well. It focuses on structuring the work to make sure that learning is also happening at the same time. It aims to make sure that all developers are working within their capability, and avoid decisions that will have someone work on a software that may or may not be needed.
memorize