NPTELProgramming in Java Week8 All Programming Assignment Solutions – July 2023 | Swayam. With the growth of Information and Communication Technology, there is a need to develop large and complex software.
Further, those software should be platform independent, Internet enabled, easy to modify, secure, and robust. To meet this requirement object-oriented paradigm has been developed and based on this paradigm the Java programming language emerges as the best programming environment.
Now, Java programming language is being used for mobile programming, Internet programming, and many other applications compatible to distributed systems.
This course aims to cover the essential topics of Java programming so that the participants can improve their skills to cope with the current demand of IT industries and solve many problems in their own filed of studies.
COURSE LAYOUT
Week 1 : Overview of Object-Oriented Programming and Java
Week 2 : Java Programming Elements
Week 3 : Input-Output Handling in Java
Week 4 : Encapsulation
Week 5 : Inheritance
Week 6 : Exception Handling
Week 7 : Multithreaded Programming
Week 8 : Java Applets and Servlets
Week 9 : Java Swing and Abstract Windowing Toolkit (AWT)
Week 10 : Networking with Java
Week 11: Java Object Database Connectivity (ODBC)
Week 12: Interface and Packages for Software Development
Course Name : “Programming in Java 2023”
Question : 1 Write a program which will print a pyramid of “*” ‘s of height “n” and print the number of “*” ‘s in the pyramid.
For example:
Input : 5
Output :
*
* * *
* * * * *
* * * * * * *
* * * * * * * * *
25
Course Name : “Programming in Java 2023”
Question : 2 Write a program which will print a pascal pyramid of “*” ‘s of height “l” .
For example:
Input : 8
Output :
*
* *
* * *
* * * *
* * * * *
* * * * * *
* * * * * * *
* * * * * * * *
Course Name : “Programming in Java 2023”
Question : 3 Write a program which will print a pyramid of “numbers” ‘s of height “n” and print the sum of all number’s in the pyramid.
For example:
Input : 5
Output :
1
1 2 3
1 2 3 4 5
1 2 3 4 5 6 7
1 2 3 4 5 6 7 8 9
95
Course Name : “Programming in Java 2023”
Question : 4 Write a program to print symmetric Pascal’s triangle of “*” ‘s of height “l” of odd length . If input “l” is even then your program will print “Invalid line number”.
For example:
Input : 5
Output :
*
* *
* * *
* *
*
Course Name : “Programming in Java 2023”
Question : 5Write a program to display any digit(n) from 0-9 represented as a “7 segment display”.