MCSL-054 ASSIGNMENT SOLUTION (2019-20)

If you have any queries please leave a message here
Your Message
×


PART-1 : MCS-051

Q1. Develop a web page using servlet and JDBC to display the details of books on topic DBMS available in library. Make necessary assumptions.

Answer : -

Tables are used in this program -
books (book_id, title, edition, price)
author (book_id, author_name)

DisplayDBMSBook.java

import java.io.*;
import java.sql.*;
import javax.servlet.*;
import javax.servlet.http.*;
import oracle.jdbc.driver.*;
public class DisplayDBMSBook extends HttpServlet
{
public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String url="jdbc:oracle:thin:@localhost:1521:xe";
String user="system";
String password="9748516231";
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection conn = DriverManager.getConnection(url, user, password);
Statement stmt1 = conn.createStatement();
ResultSet rs1 = stmt1.executeQuery("SELECT * FROM books WHERE category = 'DBMS'");
out.println("<center><p><table border='3' cellpadding='5'>");
out.println("<tr>");
out.println("<th>Book ID</th>");
out.println("<th>Book Title</th>");
out.println("<th>Author</th>");
out.println("<th>Edition</th>");
out.println("<th>Price</th>");
out.println("</tr>");
while(rs1.next())
{
out.println("<tr>");
out.println("<td>" + rs1.getString("book_id") + "</td>");
out.println("<td>" + rs1.getString("title") + "</td>");
int id = Integer.parseInt(rs1.getString("book_id"));
String SQL = "SELECT * FROM author WHERE book_id = " + id;
Statement stmt2 = conn.createStatement();
ResultSet rs2 = stmt2.executeQuery(SQL);
out.println("<td>");
while(rs2.next())
{
out.println(rs2.getString("author_name"));
out.println("<br />");
}
out.println("</td>");
out.println("<td>" + rs1.getString("edition") + "</td>");
out.println("<td>" + rs1.getString("price") + "</td>");
out.println("</tr>");
}
conn.close();
out.println("</table></p></center>");
}
catch(Exception e) { e.printStackTrace(); }
}
}




Q2. Write a program using JDBC and JSP to display the name, address and account number of all the saving account holders of a branch of a Bank, having balance of Rs. 5000/- or more in their account. Make necessary assumptions.

Answer : -

Tables are used in this program -
customer(cust_id, cust_name, cust_address)
account(account_no, balance, branch_code)
account_holder(account_no, cust_id)

BankCustomerDetails.jsp

<html>
<head><title>Display Customer Details</title></head>
<body>
<center><table border="3" cellpadding="10">
<tr><th>Customer Name</th><th>Customer Address</th><th>Account Number</th></tr>
<%@page import="java.sql.*"%>
<%@page import="oracle.jdbc.driver.*"%>
<%
String url = "jdbc:oracle:thin:@localhost:1521:xe";
String user = "system";
String password = "9748516231";
String SQL = "SELECT cust_name, cust_address, account.account_no FROM customer, account, account_holder WHERE customer.cust_id = account_holder.cust_id AND account_holder.account_no = account.account_no AND balance >= 5000 AND branch_code = 'SBI0000456'";
try
{
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con = DriverManager.getConnection(url, user, password);
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery(SQL);
while(rs.next())
{
%>
<tr><td><%= rs.getString("cust_name") %></td><td><%= rs.getString("cust_address") %></td><td><%= rs.getString("account_no") %></td></tr>
<%
}
con.close();
}
catch(Exception e) { e.printStackTrace(); }
%>
</table></center>
</body>
</html>




Q3. Write a JSP program using JDBC to keep records of personal information of its employees. The program should provide facility of view details of employees, modify their details and add details of new employees. Design appropriate User Interface and implement proper validation mechanism for proper and correct data entry. Make necessary assumptions.

Answer : -




Q4. Create an XML document for keeping MCA students information at a study centre of IGNOU.

Answer : -

MCA_Student.xml

<?xml version="1.0" ?>
<!DOCTYPE Student
[
<!ELEMENT Student (EnrolmentNo, Name, Address+, Phone+, DateOfBirth, Semester, Assignment*)>
<!ELEMENT EnrolmentNo (#PCDATA)>
<!ELEMENT Name (FirstName, MiddleName?, LastName)>
<!ELEMENT FirstName (#PCDATA)>
<!ELEMENT MiddleName (#PCDATA)>
<!ELEMENT LastName (#PCDATA)>
<!ELEMENT Address (#PCDATA)>
<!ATTLIST Address AddressType (Permanent|Present) "Permanent">
<!ELEMENT Phone (#PCDATA)>
<!ELEMENT DateOfBirth (#PCDATA)>
<!ELEMENT Semester (#PCDATA)>
<!ELEMENT Assignment (CourseCode, SubmitDate, Marks)>
<!ELEMENT CourseCode (#PCDATA)>
<!ELEMENT SubmitDate (#PCDATA)>
<!ELEMENT Marks (#PCDATA)>
]>

<Student>
<EnrolmentNo>105508022</EnrolmentNo>
<Name>
<FirstName>Debabrata</FirstName>
<LastName>Panchadhyay</LastName>
</Name>
<Address>12/18 Padmapukur Road Kolkata - 700092</Address>
<Address AddressType="Present">3/92 Sanghati Colony Kolkata - 700047</Address>
<Phone>9748516231</Phone>
<Phone>9073919231</Phone>
<DateOfBirth>26/08/1991</DateOfBirth>
<Semester>5</Semester>
<Assignment>
<CourseCode>MCS-051</CourseCode>
<SubmitDate>24/10/2019</SubmitDate>
<Marks>85</Marks>
</Assignment>
<Assignment>
<CourseCode>MCS-052</CourseCode>
<SubmitDate>24/10/2019</SubmitDate>
<Marks>80</Marks>
</Assignment>
<Assignment>
<CourseCode>MCSL-054</CourseCode>
<SubmitDate>25/10/2019</SubmitDate>
<Marks>92</Marks>
</Assignment>
</Student>






PART-2 : MCS-053

Q1. Write a program in C/C++ using OpenGL to draw a Triangle of orange colour and inside that draw a Circle of green colour.

Answer : -




Q2. Write a program in C/C++ using OpenGL to draw a hard wire house as shown in figure given below using openGL.

Answer : -




Q3. Write a program in C or C++ to implement Scan-Line Polygon Filling Algorithm.

Answer : -




Q4. Write a program in C/C++ to implement Cohen-Sutherland line clipping algorithm. In this implementation consider two cases of a line: totally visible, totally invisible, against the rectangular clipping window.

Answer : -



ABOUT US

QuestionSolves.com is an educational website that helps worldwide students in solving computer education related queries.

Also, different software like Visual Studio, SQL Server, Oracle etc. are available to download in different versions.

Moreover, QuestionSolves.com provides solutions to your questions and assignments also.


MORE TOPIC


Windows Command

UNIX Command

IGNOU Assignment Solution

IGNOU Question Paper Solution

Solutions of Different Questions


WHAT WE DO


Website Devlopment

Training

Home Learning

Provide BCA, MCA Projects

Provide Assignment & Question Paper Solution


CONTACT US


Follow Us