0% found this document useful (0 votes)
32 views43 pages

Ajp Lab Manual 1 - 10

The AJP (Analog and Digital Electronics) Lab Manual typically serves as a guide for students working on practical experiments in analog and digital electronics. Here's a general description of what such a lab manual might contain: 1. Introduction: Overview of Analog and Digital Electronics: Introduces the concepts of analog signals, digital signals, and their importance in modern electronics. Learning Objectives: Outlines the key learning outcomes from the lab sessions, such as understanding

Uploaded by

dilipnawale27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
32 views43 pages

Ajp Lab Manual 1 - 10

The AJP (Analog and Digital Electronics) Lab Manual typically serves as a guide for students working on practical experiments in analog and digital electronics. Here's a general description of what such a lab manual might contain: 1. Introduction: Overview of Analog and Digital Electronics: Introduces the concepts of analog signals, digital signals, and their importance in modern electronics. Learning Objectives: Outlines the key learning outcomes from the lab sessions, such as understanding

Uploaded by

dilipnawale27
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 43
Advanced Java Programming (22517) 7 - —— Iv. Vi Vi. Practical No. 1: Write a program to demonstrate the use of AWT components. Practical Significance: Text Field, Text Area, Button, Checkbox, Radio Buttons(Check Box Group) are the AWT components. Used to design the GUI in java. A component is object having representation that can be displayed on the screen to interact with the user. Relevant Program Outcomes (POs) * Basic knowledge: Apply knowledge of ‘engineering to solve the computer group related problems. «Discipline knowledge: Apply Computer Programming knowledge to solve the computer group related problems * Experiments and practice: Plan to perform experiments and practices to.use results to solve the computer group related problems. Engineering tools: Apply relevant Computer programm: tools with an understanding of the limitations. Individual and Team work: Function effectively as a le diverse/multidisciplinary teams. * Communication: Communicate effectively in oral and written form. basic mathematics, sciences and basic the ing / technologies and ader and team member in Competency and Practical skills To develop standalone applications The practical is expected to develop the following skills: 1. Able to design form using required AWT components 2. Able to understand the different Components available in AWT Relevant Course Outcome(s) Develop programs using GUI Framework AWT. Practical Outcome (PrOs) Write a program to demonstrate the use of AWT components. Relevant Affective domain related Outcome(s) 1. Follow precautionary measures. 2. Follow naming conventions. 3. Follow ethical practices. Minimum Theoretical Background AWT is a java programming language class library. Components are visible objects that can interact with the user. Containers (Frame, Panel, Applet) are used to hold components using in a specific layout. Using applet window, design following AWT components using add() method of components class. Following are some AWT components 1, Label: Creates a label that displays a string. . : 2. TextField Creates and accepts a single-line text from user. 3. TextArea Creates and accepts multiple line text from user. Maharashtra state Board of Technical Education 7 7 _ Advanced Java Programming (22517) | — ~ Vu. 4. Butt eates ush button. a le options. io button. 6. CheckboxGroup creates a group of checkbox to act as radio To Create Textarea sa tin i — a ; : on C'(AnceL')3 Eade Cold Paraver ons yeaa ee 3 £ 7 : Es cere ngs tt) Frome £ = new frame ('tabets ChectBox”) : reais 5 > €- Set Size Ceoo, 600): aa s ut Ee ut (33+ ee “ t { Gieck be xe climes Can cae eae N= “Nay a=: Cy He Rt SS Ca = new Pheckbox CEnglish" 35 a = new checkbox (“Sanskst “D3 Feadd (pry; tc na oping 51, cca al 3 VEIL, Resources required (Additional) — an ied iasecan en gecane 8 toa Raat ream Oem PO rsa rts St i apr Addon) + Rae torte age ge AEP a hee a ‘Bue tvs: Sop Cams Pr [Se] Smo reams | 1 7 . re ens Lela Drespeinenton | Gran | Rams an Se etl gine pe 1 No | Reece 5 mene Se pe nl T feegpater Sapp OMPORNTT TS | 7 + SPISTN Tectne zhos windows [ “+ tnavidat and Team works Fuconeflecvely a eter and eam member in : Bowman oe Program Code: Teacher mast asgn a separate program statement 04p + Communicate Conca elec inaran wie Sree . 7 Ni iva Popamts sow flowing pe 1, Compete and Prac ts {top moc pins ad web Apion ; The rasa exposed develope foi sil (fet devp an apletapeain sing Chose List componss. IN. Relerant Coarse Onicomds) : Develo pops ng Ul Pramewock (WT and Sig). ¥. Practical Outcome Pr0s) ‘Wrne argo dcp frm aig the camponets Lis sn Coie ‘Minimo Theoretical Background ‘Lie Ces ist fy which he ser an coos lists Come List) allows only one ite o be selécted 145 t eniw)m feeeeeay eve (ot maton, Io me Sa) ‘mtr em i elo mye Ta ve Want Tal Eo aa Boel TT Advanced Java Programming (22517) XI. Result (Output of Code): XII. Practical Related Questions Note: Below given are few sample questions for reference. Teacher must design more such questions so as to ensure the achievement of identified CO 1. Write the name of components used in following output Select Subjécts You Like Applet started. Figure 2 Maharashtra state Board of Technical Education Advanced Java Programming (22517) 2. State the difference between List and Choice control 3. Write the use of getSelecteditem() and getSelectedindex() for List. ‘ (Space for answer) Advanced Java Programming (22517) XUL Exercise: 1. Develop an applet/ application using List components to add names of 10 differ, cities. : 2. Develop applet / application to select multiple names of news papers (Space for answer) odes simple cael rena Layout within # window, Whe ne ay my sii dn hg cere ie ako eo yy pear se any yo eta ra ot oe of embraces and te A arpa ta rp pact Pooieg inOWHR 1 solve ye ‘spr pp i IE 1 apeict tna proce Pin pro expire aN PES 0 ey fealutose cana ep es Bln Engng ton Ap slant ConpterSroeenining/ chloe ay * aetna fhe insta. Inada and Tam vor Fucion elective a3 eda tam ember Compete nd Prat is {inca tan ste } ‘heat epee cee te owing sil: Aleta Sot iat Ape Ft sd Pac 21 Ato demas ee of etre per of ayes Manager eleven Cour Outcomes) ‘ovens wg GUT mew ANT and Swing Pree! Outcome Pr) Woes ogame dsp singe cla wih es of Gayot, Undid he dean aout diet otis ih at Apt Frame, Pel ‘i aye wed ote stan smpnsss eal se and days hem he ‘eves menor fread clus One compensa dey neath ean {het Contr Laon 1 Gaye ces gout thc colurn er component in 0. 2 Ghaayoutins ows int es) cet a Lou we VE OY ad elas bt opp teen te compos 3. Gen em, ena ces nit the gnc sows and rs slang with item host ad eri gape me [SrcssLayoutll te deta apt rbd then We have ase setBoands ‘Std layout epnent Resources required Adon Resources wed (Adana) Rem] et ray [een] s)he | s oe Lip es windows | — _ ae seen eee teereere nee TO Wis Program oDemonsate Gi af $ 2 Weep day The Number Bun fo 018. EE - Advanced Java Programming (22817) _____—— XI. _ Result (Output of Code): XII. Practical Related Questions Note: Below given are few sample questions for reference. Teacher must design ‘more such questions so as to ensure the achievement of identified CO. 1. Give name of default Layout for Different container 2. List the names of BorderLayout regions. 3. Write the default horizontal and vertical gap in FlowLayout 4. Write the use of Insets in barder layout. ‘Maharashtra state Board of Technical Education : a _— Advanced Java Programming (22517) (Space for answer) Maharashtra state Board of Technical Education Dieott ote rohinn endl Advanced Java Programming (22517) ON. Senge Aner Advanced Java Programming (22517) n. mL. Iv. v. Vi. vu. Practical No. 4: Use of CardLayout to write a program to create a two-level card deck that allows the user to select an operating system. Practical Significance: The CardLayout class manages the components in such a manner that only one component is visible at a time. It treats each component as a card hence known as CardLayout. Relevant Program Outcomes (POs) * Basic knowledge: Apply knowledge of basic mathematics, sciences and basic engineering to solve the computer group related problems. Discipline knowledge: Apply Computer Programming knowledge to solve the computer group related problems. Experiments and practice: Plan to perform experiments and practices to use the results to solve the computer group related problems. Engineering tools: Apply relevant Computer programming / technologies and tools with an understanding of the limitations. * Individual and Team work: Function effectively as a leader and team member in diverse/multidisciplinary teams. Communication: Communicate effectively in oral and written form. Competency and Practical skills To develop standalone applications The practical is expected to develop the following skills: 1. Able to apply different layouts to Applet, Frame and Panel 2. Able to demonstrate the use of different types of Layout Manager Relevant Course Outcome(s) Develop programs using GUI Framework (AWT and Swing). Practical Outcome (PrOs) Write a program to demonstrate the use of Border layout showing four buttons at four sides of an applet with captions “left”, “right”, “top” and “bottom” Relevant Affective domain related Outcome(s) 1. Follow precautionary measures. 2. Follow naming conventions. 3. Follow ethical practices. Minimum Theoretical Background Constructors of CardLayout class 1. CardLayoutO: creates a card layout with zero horizontal and vertical gap. 2. CardLayout(int hgap, int vgap): creates a card layout with the given horizontal and vertical gap. Commonly used methods of CardLayout class 1. public void next (Container parent): is used to flip to the next card of the given container. Maharashira siate Board of Technical Education 19 Advanced Java Programming (22517) ° 7 Public void actionPerformed(ActionEvent'e) { card.next(c); 3 Public static void main(String{] args) : " CardLayoutExample cl=new CardLayoutExample(); cl.setSize(400,400); cl.setVisible(true); cl.setDefaultCloseOperation(EXIT_ON_CLOSE); } XI. Result (Output of Code): XII. Practical Related Questions Note: Below given are few sample questions for reference. Teacher must design ‘more such questions so as to ensure the achievement of identified CO. : 1. State difference between GridLayout and GridBagLayout. 2. Explain constructor of GridbagLayout. (Space for answer) ‘Maharashtra state Board of Technical Education 7 21 ~ SS ————_— Advanced Java Programming (22517) ith. ON€.... . 004 Programmi ay) tth. each...Ceme ene OT a0 Ral. SNe. COMMS. CAVE: XML. Exercise output. 1. Write Java program to display following (6) GridBag Layout Exa... ) Figure § 2. Write Java Program to display following output, Figure 6 Maharashtra state Board of Technical Education Advanced Java Programming (22517) (Space for Answer) Sdisaglayous (5 Constants CY bods Maharashtra state Board of Technical Education vo : 23 Advanced Java Programming (22517) nl. uL. IV. VL vu. Practical No. 5: Write a program using AWT to create a menu bar where menu bar contains menu items such as File, Edit, View and create a submenu under the File menu: New and Open. Practical Significance: The Menu Bar lets the user to select different menu options from the list of available menu items and perform operations on the selected menu item. Relevant Program Outcomes (POs) + Basic knowledge: Apply knowledge of basic mathematics, sciences and basic engineering to solve the computer group related, problems. * Discipline knowledge: Apply Computer Programming knowledge to solve the computer group related problems, + Experiments and practice: Plan to perform experiments and practices to use the results to solve the computer group related problems. Engineering tools: Apply relevant Computer programming / technologies and tools with an understanding of the limitations. ¢ Individual and Team work: Function effectively as a leader and team member in diverse/multidisciplinary teams. * Communication: Communicate effectively in oral and written form. Competency and Practical skills To develop standalone applications The practical is expected to develop the following skills: 1. Able to develop Menu, Menu Bar and Menu Items 2. Able to write a program using Menu Bar and assign shortcuts Relevant Course Outcome(s) Develop programs using GUI Framework (AWT and Swing) Practical Outcome (PrOs) Write a program using AWT to create a menu bar where menu bar contains menu items such as File, Edit, View and create a submenu under the File menu: New and Open. Relevant Affective domain related Outcome(s) 1. Follow precautionary measures. 2. Follow naming conventions. 3. Follow ethical practices. Minimum Theoretical Background A top-level window can have a menu bar associated with it, A menu bar displays a list of top-level menu choices. Each choice is associated with a drop-down menu, This concept is implemented in the AWT by the following classes: Menu Bar, Menu, and Menu Item Maharashira state Board of Technical Education : | 25 Advanced Java Programming (22517) XI. Result (Output of Code): XII. Practical Related Questions 5 Note: Below given are few sample questions for reference. Teacher must design more such questions so as to ensure the achievement of identified CO. 1. Write the use of setEnabled() method 2. Write the procedure to assign shortcut key to the Menu Item 3. Write a syntax and use of addSeparator() method (Space for answer) Maharashtra state Board of Technical Education 27 —— ava Frogramming (22817) ae XII. Exercise 1. Find errors in following program and display output a8 shown below, import java.awt.*; import java.awt.event.*; Public class MenuDemol extends Frame { MenuBar mb; Menultem mi,m2,m3,m4; Menu mn; MenuShorteut ms; MenuDemol() setTitle("MenuBar Demo"); setSize(500,500); setLayout(null); ms~new MenuShorteut(KeyEvent. VK_X); mn=new Menu("File"); mb=new MenuBar(); ml=new Menultem("New,, "\ m2=new Menultem(*Open, m3=new Menultem("Save m4=new Menultem("Exit"smn Tate Board of Technical Education Advanced Java Programming (22517) mn.add(m1); mn.add(m2); mn.add(m3); mn.addSeparator(); mn.add(m4); mb.add(mn); y Public static void main(String[] args) { MenuDemol md=new MenuDemol(); md.setVisible(true); Figure 7 (Space for Answer) ‘Maharashtra state Board of Technical Education 2 Public sia void maining... z ~~ O2w Menubenos.¢ ie. a Xiy, References, Suggestions for Further Reading a https:/;www javatpoint.com . https:/‘www.tutorialspoint.com/java . The complete reference Java 2 by Herbert Schildt Xv, Assessment Scheme Performance Indicators Weightage Process related (35 Marks) 70% [ry Logic formation 30% Ea Debugging ability 30% "Cn a") [Etie i: File C"C:\\ Advance java" )s fox Cee x: i-MeiFiles OO) $ Sf Cx ispixectom oy) 3 I peta inutabletreeNnde temp: pew ___DeFaultmutahleTreeNode Cx - qetnome )); || Fov Crile yt x rst eites ty) I 1 tecspradd Caan batalimdaleesuade = C& - gedNome ())33 ltMluras! de (x geinamed $s — ——— — + —n ee = =r [5 [ Beco = , oo = farerey oor ve temo —_—————— : — 1 Shravaoi, rok hande [ Nas oh —— seetaedtss) | Relateacisy | TNS” 34 1s ag cs 22817) Advanced Java Programming (2251 nh In. Vi. Vi. am to create a JTable rogr? Practical No. 8: write @ P' «¢ and columns of data. Studeny. ' 7 nce yw S : il Apr coe that disp vis JComponent. THE CUTSOF can ane eo ch extends whic to use JTable class in Java whit column boundaries to resize col mes (POS) sie mathematics, scienog Relevant Program Outcomes PO of ba ic mathema < * Basic knowledge: Apply ter group related P engineering to solve the compute * Discipline knowledge: Apply ¢ computer group eated DIES eriments and practi + Experiments and practice: Pan 1 peter See 0 results to solve the computer e oo t Computer programming / chlo, + Engineering tools: Apply relevant Com tots with an understanding Function effectively as a leader and team Men * Individual and Team cS Aiverse/multidisciplinary teams. * Communication: Communicate effectively in or ter Programming knowledge 1 sy he 8 ty | and written form, Competency and Practi . To develop Sandalone applications using swing feeteiea The practical is expected to develop the following skills: id columns 1. Able to implement the JTable with respective rows and c oe 2. Able to write the program using JTable and perform various operations on jz Relevant Course Outcome(s) ; Develop programs using GUI Framework (AWT and Swing) Practical Outcome (BrOs) Write a program to create a JTable on applet window/Frame Relevant Affective domain related Outcome(s) 1. Follow precautionary measures, 2. Follow naming conventions, 3. Follow ethical practices, Minimum Theoretical Background Cables are implemented by the Table class, which extends JComponent. Constructors of JTable: |. JTable(): Creates a table with empty cells 2, ,{Table(Object data 1], Object eolfeads collieadal® 4 So-dimensional array of the information to be presented, i is @ one-dimensional array with the column headings, Here are the steps for using a table in an : 1. Create a JTable object, Applet; Maharashira state Board of Technical Education Result (Output of Code): XIL Practical Related Questions Note: Below given are few more such questions so as to }~ Name the superclass of JTable component, 2. How rows are inserted in table, 3. How to add JTable to JPanel ? sample questions ensure the achievement of identified CO. Sor reference. Teacher (Space for answer) Maharashtra state Board of Technical Education must design _ ‘Advanced Java Programming (22517) XIIL Exercise 1. Write a Java program to create a table of Name of Student, Percentage and Grade of 10 students using JTable. (Space for answer) htra state Board of Technical Education AS e ‘Maharashira state Board of Technical Education ————————____ oN Advanced Java Pr 22517) “vanced Java Programming (22517) launch a JProgressBay 4 t Practical No, 9: Write a program L ; f the task. Stud ean mg He Sg IProgressBar class is us Y able to use JProgressBar to see the progress of the a Jf basic mathematics, sciences any lated problems. Programming Knowledge to go), a M. __ Relevant Program Outcomes (POS) * Basic knowledge: Apply knowledge © engineering to solve the computer group T * Discipline knowledge: Apply Computer : cor ite ited problems. ‘1 * s. results to solve the computer group related problem | * Engineering tools: Apply relevant Computer progr Bis ay tools with an understanding of the limitations. al Individual and Team work: Function effectively as @ leader and team memg it diverse/multidisciplinary teams. i written form. * Communication: Communicate effectively in oral and TH. Competency and Practical skills : ts To develop standalone applications using swing componen! The practical is expected to develop the following skills: 1. Able to implement the JProgressBar with its orientation. 2. Able to write the program using JProgressBar. IV. Relevant Course Outcome(s) ‘i Develop programs using GUI Framework (AWT and Swing) V. Practical Outcome (PrOs) Write a program to launcli a JProgressBar VI. Relevant Affective domain related Outcome(s) 1. Follow precautionary measures. 2. Follow naming conventions. 3. Follow ethical practices. VIL. Minimum Theoretical Background The JProgressBar class is used to display progress bar while installation of some so! class. the progress of the task. We usually see the ftware is going on. It inherits JComponest ‘Commonly used Constructors: JProgressBar (): It is used to create a horizontal Progress bar without progress string. JProgressBar (int min, int max): It is used to create a horizontal progress bar with the specified minimum and maximum value. i JProgressBar(int orient) : It is used to create a Progress bar with the specified orientation, | ft can be sither. ° Vertical’ or Horizontal by vsitd SwingConstants. VERTICAL and SwingConstants, HORIZONTAL constants. ‘Maharashtra state Board of Technical Education Advanced Java Programming 22517) _—— XI Result (Output of Code): XI. Practical Related Questions Te ions for reference. ‘eacher m, Note: Below given are few ‘sample quest? nti ast more such "vaestions so ie vo ensure He ‘achieverne”™” of identified CO. fey 1. Name different Orientation of Progress Bar. 2. Explain the Purpose of setValueO- 3. What is the use of minimum and maxi jmum value of progressbar. Maharashtra Wate Board of Technical Education 5 _ Advanced Java Programming (22517) XI. Exercise 1. Develop a program to demonstrat strate the use of JProgressBar. 2. Write a Program using JProgrossia ow f Progressbar when user clicks on JButton 'ssBar to show the progress o| (Space for answer) state Board of Technical Education n. ml. IV. VL. vu. ced Java Programming (22517) Pi : Wri ractical No. 10: Write a program to demonstrate status of key on Applet window such as KeyPressed, KeyReleased, KeyUp, KeyDown. Practical Significance: Eve 7 a Key! Py, Benerated when keyboard input occurs. When key is pressed, released typed rey gy, Cvent is generated. Students will be able to understand the method to register an object and handle various key of Keyboards: Relevant Program Outcomes (POs) * Basic knowledge: Apply knowledge of basic mathematics, sciences and basic engineering to solve the computer group related problems. Discipline knowledge: Apply Computer Programming knowledge to solve the computer group related problems. + Experiments and practice: Plan to perform experiments and practices to use the results to solve the computer group related problems. Engineering tools: Apply relevant Computer programming / technologies and tools with an understanding of the limitations. Individual and Team work: Function effectively as a leader and team member in diverse/multidisciplinary teams. * Communication: Communicate effectively in oral and written form. ‘Competency and Practical skills Using this Practical, students will be able to generate different events .Also, they are able to implement various methods for appropriate listener class and write and execute programs accordingly. Relevant Course Outcome(s) : * Handle Events of AWT and Swing Components. * Develop programs to handle events in Java Programming. Practical Outcome (PrOs) Write a program to demonstrate status of key on Applet window such as KeyPressed, Key Released, KeyUp, and KeyDown Relevant Affective domain related Outcome(s) 1. Follow precautionary measures. 2. Follow naming conventions. 3. Follow ethical practices. Minimum Theoretical Background When keyboard input is occurred, a KeyEvent is generated. There are mainly three types of key events that are recognized by integer constants as follows: KEY_PRESSED, KEY_RELEASED, KEY_TYPED When key is pressed or released, first two events are generated. When character is pressed, the last event occurs, All Keys do not generate character. E.g, Shift Key ‘Maharashtra state Board of Technical Education o ree Mputkvent is super class of KeyEvent. The class which processes the KeyEvent should implement KeyListeney inte The object of that class must be registered with a component. ‘ Hobie ‘egistered using the addKeyListener () method. Sy Methods of KeyListener interface: Void keyPressed(KeyEvent e) : Invoked when a key is pressed Void keyReleased(KeyEvent e) : Invoked when a key has been released Void keyTyped(KeyEvent e) : Invoked when a key has been typed VIL Resources required (Additional)- Nil TX. Resources used (Additional) - Broad Specification Seen | Bests Otay 18 | Name of Resource TDk X. Program Code: Teacher must assign a separate program statement to Brug 34 Students. ~ Write a program to generate KeyEvent when a key is pressed and display “Ke sed” message. ; 2 Develop a program which will implement special keys such as function keys ag » arrow keys. Tmpost Sava. aw4-event. ReyEvend 5 tpord 5 JAVA. Awt- event: KeyLlistener 5 TmrPovt Javax. suwing-* Public class Key Press Event Example extends TRrame Public Keypress Evert Exampie oy Plements Rey listener | Z addkeylistenes CHHIS5 Sexsize (306, 20s oA DeFaw4 Close Operation ( TRrame. ExT TON CLOSE Sesvisible C hue} Gorrie. s keytyped Chey Even ©) 23 ee ae keypressed Chey tvente) J Maharashtra state Board of Technical Education a “Advanced ava Programming (22517) Syste OW PRAM Co Key pressed “Fe. geakey chart) yeride © cree Lord keyRealeased Ckeyevent ©) FF public Static void maln (Srna C3 a%g3 ) 2 swing Ul Wes. Tpvokelatey (0). new 3 KeyPress Event Cxample 6) 5 XI. Result (Output of Code): g. B20... PE rex XI. Practical Related Questions Note: Below given are few sample questions for reference. Teacher must design more such questions so as to ensure the achievement of identified CO. 1. Name any four Event Listener interfaces. 2. State the situation when all three events of KeyListener interface are generated? o (Space for answer) ‘Maharashtra state Board of Technical Education i 35 Advanced Java Programming (22517) XII Exercise . 1. Elaborate the terms Event, Source and Listener. 2. List various methods of ActionListener interface, 3. Develop a program to accept two numbers and display product of o a when user pressed “Multiply” button. 1, (Space for answer) Maharashtra state Board of Technical Education 4

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy