Java Model Paper

BCA Semester 4 – CS-19 | Programming with Java (April-2022)

  • All the students have to write this model paper and
  • Preliminary exam paper with all the options

Download

Important Links for Java and Android

Java and Android Programming Tutorials

Java Hibernate Tutorials

Arithmetic Operation using AWT Frame with Event Delegation

import java.awt.Button;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.Label;
// author : www.raviroza.com
// date   : 27-Jan-2023, 8.25 am
import java.awt.TextField;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class ArithmaticOperation 
extends Frame
implements ActionListener
{
	Label l1,l2,lblResult;
	TextField txtNo1, txtNo2;
	Button btnAdd, btnSub, btnMul, btnDiv;
	
	public ArithmaticOperation() {
		// TODO Auto-generated constructor stub
		l1 = new Label("enter number 1 : ");
		l2 = new Label("enter number 2 : ");
		lblResult = new Label("0");
		
		txtNo1 = new TextField(3);
		txtNo2 = new TextField(3);
		
		btnAdd = new Button("+");
		btnSub = new Button("-");
		btnMul = new Button("*");
		btnDiv = new Button("/");
		
		setLayout(new FlowLayout());
		add(l1);  add(txtNo1);
		add(l2);  add(txtNo2);
		
		add(lblResult);
		
		add(btnAdd);  add(btnSub);
		add(btnMul);  add(btnDiv);
		
		btnAdd.addActionListener(this);
		btnSub.addActionListener(this);
		btnMul.addActionListener(this);
		btnDiv.addActionListener(this);
		
			
		setSize(500, 500);
		//validate();
		
		setVisible(true);
	}	
	public void actionPerformed(ActionEvent e) 
	{
		int a = Integer.parseInt(txtNo1.getText());
		int b = Integer.parseInt(txtNo2.getText());
		int c = 0;
		if(e.getSource() == btnAdd)		
		{
				c = a + b;			
		}		
		else if(e.getSource() == btnSub)
		{
				c = a - b;			
		}
		else if(e.getSource() == btnMul)
		{
				c = a * b;			
		}
		else if(e.getSource() == btnDiv)
		{
				c = a / b;			
		}							
		lblResult.setText ( Integer.toString(c));
	}
	public static void main(String[] args) 
	{
		new ArithmaticOperation();
	}
}

Digital Architect

‘ડિજિટલ આર્કિટેક્ટ’ – યુવાનો માટે કારકિર્દી ની ઉત્તમ તક

નવા જમના માં, જમના પ્રમાણે ના ટ્રેન્ડ મુજબ કારકિર્દી ઘડવી એજ સમય ની જરૂરિયાત છે. એ સાથે આ તે વરી એવી રાહ છે કે જ્યાં ઈચ્છા મુજબ સેલેરી પણ મેળવી છે. આજના ડિજિટલ યુગ માં કેરિયર માટે ની ઉત્તમ તકો છુપાયેલી છે, તેમાંની ‘ડિજિટલ આર્કિટેક્ટ’ પણ એક છે.

‘ડિજિટલ આર્કિટેક્ટ’ શું છે ?

ડિજિટલ આર્કિટેક્ટ એક ખાસ પ્રકાર નો વ્યવસાય છે. તેની અંદર જુદી જુદી ઇન્ફોરમેશન ટેક્નોલોજી નો ઉપયોગ કરી કમ્પની દ્વારા ઓવર-ઓલ  ટર્નઓવર, પ્રોફિટ, માર્કેટ ટ્રેન્ડ, માર્કેટિંગ વગેરે જેવા લક્ષ્યાંક પ્રાપ્ત કરવામાં આવે છે.

તેની અંદર ડેટા સાયન્સ , કલાઉડ કોમ્પ્યુટીંગ, ડેટા એનાલિસિસ, બિઝનેસ એપ્લિકેશન, આર્ટીફીસીયલ ઇન્ટેલિજેંસ,   સેકયુરિટી ઇન્ટેલીજેન્સ, ટ્રેડિશનલ સાયન્સ અને ડિજિટલ 3-d પ્રિન્ટિંગનું સંકલન કરવામાં  આવે છે.

આ ક્રમ માં બિઝનેસ સાથે જોડાયેલ અગત્યના નિર્ણય IT આધારીત ટેક્નોલોજી થી પ્રાપ્ત કરેલા વિશ્લેષણ દ્વારા મેળવામાં આવે છે. અને આજ કારણસર મોટી કંપની ઓ ડિજિટલ ટેક્નોલોજીમાં વિભિન્ન રીતે માહિતગાર હોય તેવા લોકો ને રાખે છે. જે મેનેજમેન્ટ ને યોગ્ય નિર્ણય લેવામાં મદદ રૂપ થાય છે. 

જવાબદારીઓ કેવી હોય છે?

  1. કંપની દ્વારા IT ટિમ ને માર્ગદર્શન આપવા તેમજ નિર્ધારિત લક્ષ્યને પાર પાડવામાં આડે આવતી સમસ્યાને દૂર કરવું એ ડિજિટલ આર્કિટેક્ટ નું મુખ્ય કાર્ય છે.
  2. IT ટુલ્સની મદદ થી મેનેજમેન્ટ ને સમયાંતરે વૈકલ્પિક સમાધાનો થી વાકેફ કરવુ.
  3. કંપની ની સેવા કે વસ્તુ પર ગ્રાહકોના ફીડબેક અને અભિપ્રાય લઇ તેનું વિશ્લેષણ કરવાનું કાર્ય.
  4. નવી ટેક્નોલોજી ની ઓળખ કરવી અને કંપની તેને અપનાવે તે માટે પ્રયત્ન કરવા.

‘ડિજિટલ આર્કિટેક્ટ’ માટે તક ક્યાં છે ?

  1. મલ્ટી-નેશનલ કંપનીઓ થી લઇને લોકલ લેવલની કંપનીઓ માં આવા ટ્રેન્ડ પ્રોફેશનલ માટે નોકરી તક રહેલી છે.
  2. સેલેરી અને ભથ્થા IT કંપની ના અલગ-અલગ વિભાગમાં મેળવેલી લાયકાત ના આધારે નક્કી થાય છે.
  3. આવા પ્રોફેશનલ્સ ને મૅનેજમેન્ટ હોદાના સમકક્ષ વેતન મળી રહે છે.

રસનું ક્ષેત્ર 

  1. પ્રોફેશનલ્સ માટે માત્ર IT ના જાણકાર હોવું પૂરતું નથી. સાથે સાથે બિઝનેસ માં પણ તેમને રસ હોવો જરૂરી છે.
  2. BCA / PGDCA / MCA / Engineering કરેલા યુવાનો માટે કારકિર્દી બનાવવાનો આ ઉત્તમ માર્ગ છે. આ માટે યુવાનો એ IT ક્ષેત્ર માં આવનારી નવી નવી technology થી ઉપડૅટ થવું જરૂરી છે.
  3. આ ક્ષેત્ર માં જેમ જેમ આગળ વધશે તેમ તેમ રોજગારી ના નવા વિકલ્પો મળતા રહેશે.

ડિગ્રી કોર્સીસ 

  1. આ ક્ષેત્ર માં ઓળખ બનાવ માટે BCA / PGDCA / B. Tech (IT-Computer Science) ઉપરાંત SAP, Big – Data, AI, Cloud Computing, Oracle, Java, PHP, .Net જેવી ટ્રેનિંગ ની જરૂર છે.
  2. હાલ ના તબક્કે સરકારી સંસ્થાઓ માં આ વિષય ને અનુરૂપ કોઈ પણ સ્પેશ્યલ  ડિગ્રી કે માસ્ટર કોર્ષ ઉપલબ્ધ નથી, પરંતુ જે વિદ્યાર્થીઓ કારકિર્દી બનવા ઇચ્છતા હોય તેઓ BCA (ધોરણ – 12 પછી), PGDCA (ગ્રેજ્યુએટ થયા પછી) કરીને અનેક પ્રકાર ના IT ટુલ્સ શીખી શકે છે. 
  3. અનેક પ્રકારના  IT ટુલ્સ માં નિપુણ થઇ ડિજિટલ આર્કિટેક્ટ બનવાની યોગ્ય તક મળી રહે છે.

Video Tutorial to Learn Java Basics

Java is an object-oriented programming language written from scratch by James Gosling at Sun Micro-systems and released in 1995. Some of the syntaxes of java are similar to c and C++.

Following is Java Video tutorial to learn basics of Java language.

JDBC Callable Statement Theory

  • CallableStatement interface is used to call the stored procedures or functions.
  • We can have business logic on the database by the use of stored procedures and functions that will make the performance better because they are precompiled.
  • For example we need to retrieve the age of the student based on birth date, one may create a function that receives date as INPUT and returns age of the student as the OUTPUT.

Watch “JSP Part-19 | JSP JDBC with CRUD – Code Optimization, Retrieving Data using Array List (Gujarati)” on YouTube

➡️ Retrieving data using Array List (array list of objects)
➡️ Code Optimization

Here, Array List us used to hold the list of object of type EmpBean.

JSP with Bean and Data access object (DAO). JSP is the normal jsp page which uses the bean to store employee information. The DAO file also know an Data Access Layer of our application, contains the code perform database operations such as add, change, delete etc.,

This video demonstrates the best usage of MVC (Model View & Controller) architecture in Java.
➡️ The model here is the EmpBean which holds the employee information.
➡️ The index page is the View which is interface used by client to enter the input and get to view the output.
➡️ The controller here the file which accepts the request from client and sets to bean and bean finally manages the database operation.

CRUD – Create, Read, Update & Delete

With reference to previous video 👉 https://youtu.be/63cIEAnz7Hc which consist of Add operation & Display operation.
and 👉 https://youtu.be/Asi4H3QCHY4 which consist of Delete operation.

In this video the same example has been extended to support Edit/Update operation using display page. The link (url to edit page and ID of record to be updated) has been generated in the display page for to update record.

Once user click the Edit link , the control is transfer to edit.jsp page, where the the ID of the record to be updated is fetch from request object and the other details are set in text boxes so that user can edit the data.

There is a Update (submit) button which transfer user control to the update.jsp page, where all the submitted data is updated into emp table.

#RaviROza #JSPJDBC #CRUD #AdvanceJava #Jdk #Java #Gujarati #ArrayList #CodeOptimizationInJava

OS : Windows 10
Jdk : Version 8
IDE : Eclipse Mars
Server : Apache Tomcat 7

Follow me @
https://raviroza.wordpress.com/
https://raviroza.blogspot.com/
https://www.facebook.com/ravi.oza.it
https://twitter.com/raviozaIT

Subscribe my channel to get latest video notification https://www.youtube.com/user/ravioza101