Skip to content

Commit 602f294

Browse files
Index
Week 12 Update
1 parent 0ce5707 commit 602f294

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed

README.md

+72
Original file line numberDiff line numberDiff line change
@@ -392,3 +392,75 @@ Structure of Table 'PLAYERS' is given below:
392392

393393

394394
[Java Week 11:Q5](https://github.com/bkkothari2255/Programming_In_Java_NPTEL/blob/WEEK-11/DropTable.java) Complete the code segment to drop the table named ‘PLAYERS’.
395+
396+
## [WEEK 12](https://github.com/bkkothari2255/Programming_In_Java_NPTEL/tree/WEEK-12)
397+
398+
[Java Week 12:Q1](https://github.com/bkkothari2255/Programming_In_Java_NPTEL/blob/WEEK-12/Question92.java) Complete the code to develop an extended version of the ADVANCED CALCULATOR with added special functions that emulates all the functions of the GUI Calculator as shown in the image.
399+
400+
![GUI Calculator](https://storage.googleapis.com/swayam-node1-production.appspot.com/assets/img/noc19_cs84/GUI1.JPG)
401+
402+
```text
403+
Note the following points carefully:
404+
1. Use only double datatype to store all numeric values.
405+
2. Each button on the calculator should be operated by typing the characters from 'a' to 't'.
406+
3. You may use the already defined function gui_map(char).
407+
4. Use predefined methods from java.lang.Math class wherever applicable.
408+
5. Without '=' binary operations won't give output as shown in Input_3 and Output_3 example below.
409+
5. The calculator should be able to perform required operations on one or two operands as shown in the below example:
410+
411+
Input_1:
412+
okhid
413+
414+
Output_1:
415+
100.0
416+
417+
Input_2:
418+
ia
419+
420+
Output_2:
421+
2.0
422+
423+
Input_3:
424+
okhi
425+
426+
Output_3:
427+
428+
```
429+
430+
[Java Week 12:Q2](https://github.com/bkkothari2255/Programming_In_Java_NPTEL/blob/WEEK-12/Question2.java) A partial code fragment is given. The URL class object is created in try block.You should write appropriate method( ) to print the protocol name and host name from the given url string.
431+
```text
432+
For example:
433+
https://www.xyz.com:1080/index.htm
434+
435+
protocol://host:port/filename
436+
```
437+
438+
[Java Week 12:Q3](https://github.com/bkkothari2255/Programming_In_Java_NPTEL/blob/WEEK-12/Question3.java) Write a program to create a record by taking inputs using Scanner class as first name as string ,last name as string ,roll number as integer ,subject1 mark as float,subject2 mark as float. Your program should print in the format
439+
```text
440+
"name rollnumber avgmark".
441+
442+
For example:
443+
input:
444+
ram
445+
das
446+
123
447+
25.5
448+
24.5
449+
output:
450+
ramdas 123 25.0
451+
```
452+
453+
[Java Week 12:Q4](https://github.com/bkkothari2255/Programming_In_Java_NPTEL/blob/WEEK-12/Child.java) A program code is given to call the parent class static method and instance method in derive class without creating object of parent class. You should write the appropriate code so that the program print the contents of static method() and instance method () of parent class.
454+
455+
[Java Week 12:Q5](https://github.com/bkkothari2255/Programming_In_Java_NPTEL/blob/WEEK-12/Question5.java) Write a recursive function to print the sum of first n odd integer numbers. The recursive function should have the prototype
456+
```text
457+
" int sum_odd_n(int n) ".
458+
459+
For example :
460+
461+
input : 5
462+
output: 25
463+
464+
input : 6
465+
output : 36
466+
```

0 commit comments

Comments
 (0)