ICP4 - pondurivenkatesh9/WEB GitHub Wiki

VENKATESH PONDURI

CLASS ID : 23

TEAM : 4

CODE : https://github.com/pondurivenkatesh9/WEB/tree/master/ICP4


ToDo List Output

As soon as we run the code we are directed to the web browser of user choise and displays the output as shown below. It consists of three list which are given in code and input text box to add some new task to the list. This done by writing task in input type text box and clicking on the add button.

The below figure shows the addition of new task named lab work in the to do list. Initially all the task are in pending status.

By clicking on the pending list the task will be updated to done and the task will be striked off. This means task is done successfully.If we observe there is a count for pending and completed tasks. If pending is changed to done status then the pending and completed count will be changed as shown in the below figure.

If we want to remove particular list or task we can delete them by simply clicking on the remove button. The following figure describes about the deletion of the first task that is j query.

Calculator Output

The following figure describes the output of the calculator code. To perform operation we simply click on the number which are buttons or we can enter through keyboard by clicking keys in keyboard.

This image describes the calculation which is trying to add numbers one and one.

By clicking on equalsto button the code produce the output as two as shown below using the calculation function described in the code.

Other operation is shown in below figures.

ToDo List Code Description

In html page we write ng-repeat to perform the iterations of to list. That means it iterates and print the objects in the todolist. ng-bind is used to bind the new tasks to list.

The main part is in the script file. In this code we initially provide some lists or tasks to print in the output by using $scope. Next $scope additem function is declared to add new tasks to todo list by using push operation. As soon as the item is pushed the cursor focus to input type text box by using focus function. By using splice function we can remove the task from list. Script is written in such away that all the tasks are in pending status at initial stage. By using the append and remove elements we update the pending status to done status and remove the pending status respectivily. Now by using updateAddTotal and UpdateRemoveTotal we vary the count of pending and completed tasks.

Calculator code Description

In index.html we write code with many divs to create number buttons and operation buttons. Styling is applied to these buttons such away that they appear as calculator.

While commimg to we declare the elementarray in which we display the numbers, operations and results. First we write clear function to clear the element array. Now we write code for addition and other operations by using parseint.

Now we write code for symbols for which symbol which operation is to be performed. This is done by writing switch cases. While it comes to equalsto symbol It undergoes the calculation function.

Calculation function is described to operate operations and it uses for loop to do so as shown in below figure.