PDF Google Drive Downloader v1.1


Report a problem

Content text Core Java Lab-Manual Part2.pdf

Lab Manual | Page 247 Introduction to Lab Manual This lab manual aims at giving complete understanding of the core concepts of the topic and applying them in the exercises. The lab manual consists of a set of lab exercises defined chapter wise. Each exercise has a definite objective defined. These objectives map with the terminal objectives defined at the beginning of each chapter. The problem statement is defined with clear instructions. Some exercises have specific configuration or pre-condition mentioned. Advanced lab exercises are also given for some topics. Appendix A given at the end of lab manual contains stepwise instructions to use eclispe IDE. Configuration jdk 1.7 should be installed. The lab exercises should be coded using Java language. Specific configuration related to a particular exercise is mentioned. If it is not mentioned then the above configuration should be considered. Structure of Lab Manual Lab manual consists of different sections. The explanation of each structure is given below. Objective It states what you will achieve after completing a particular application. At the end of each lab exercise you should keep a track whether the objectives of that session are achieved. Configuration It is optional section and is present for specific lab exercises. If absent, then the configuration mentioned earlier should be considered. Pre-condition You should have understood the concepts explained in a particular chapter in the courseware thoroughly to solve the exercises mentioned. But some lab exercises will have pre-condition explicitly mentioned. Problem Statement Problem statement for each lab exercise is given. It defines clear instructions to achieve the defined objective.
Client-Server Application Development Using Java | Page 248 How to use the Lab Manual? Whenever a programmer has to transform a problem statement into a program which a computer can execute, you should split the activity in the following manner: ▪ Read the problem statement carefully. Hint is given for some problem statements to help you to solve the problem. ▪ Preparation ▪ Decide the User interface (CUI or GUI) before hand. ▪ Write the algorithm or steps to be followed to solve the problem. You can also draw flowcharts if required. ▪ The program is made modular by writing functions. So pen down expected function prototypes and arguments on paper. ▪ Also decide how one module (function) would communicate with other module (function). ▪ Give a dry run to the algorithm written. ▪ Write the code. ▪ Execute the code. Coding Practices The maintenance of code is easy if the code is written using coding practices. You should follow following coding practices while solving the lab exercises in this lab manual: ▪ Use meaningful names for variables, functions, file. ▪ Use uniform notation throughout your code. ▪ Code should be properly indented. ▪ Code should be commented. While documenting your code, write the purpose of your piece of code. What task is assigned to a method, what arguments are passed to it, what it returns should be clearly stated. Write a clear comment if you have added any statements for testing purpose. Writing a right kind of well-documented software is an art along with your technical skills. Enough necessary documentation should be done. This makes the code easily maintainable.
Lab Manual | Page 249 Java Multithreading Basics Lab Exercise - 1 Objectives ▪ Create Thread using Thread class. ▪ Create Thread using Runnable interface. Problem Statement1 Develop simple application as shown below. This application should provide concurrent functionality of incrementing by one and a multiplication table. Accept two numbers from user. First number should be incremented by 1 while a multiplication table for second number should be generated. Expected output: Accept 2 numbers from user: 2 3 Thread-1: 2 3 4 5 6 7 8 9 10 11 ... Thread-2: 3 6 9 12 15 18 21 24 ... Problem Statement2 Create an application that scrolls two banners horizontally. Create a GUI that extends JFrame and implements Runnable. Draw two strings using paint() method and move them horizontally in opposite direction. String 2 String1
Client-Server Application Development Using Java | Page 250 Java Thread Communication Lab Exercise - 2 Objective ▪ Monitor Object methods like wait(),notify(),notify All(). Problem Statement Move 3 balls on the screen (red, blue and green) with different speeds. Red is fastest followed by green and blue is the slowest. Whichever ball reaches 300 pixel locations to the right from starting position waits for other balls to arrive. When all three balls have reached the same location, they restart their movement with corresponding speeds. Expected Result: Lab Exercise - 3 Objective ▪ Create an application that demonstrates usage of Lock and Reentrant Lock. Problem Statement Create a banking domain application simulating concurrent deposit and withdraw. Hint: Following is the signature of the method: public int withdraw (Account account, int amount) {

Related document

x
Report download errors
Report content



Download file quality is faulty:
Full name:
Email:
Comment
If you encounter an error, problem, .. or have any questions during the download process, please leave a comment below. Thank you.