Programming Fundamentals Lab Manual 02
Programming Fundamentals Lab Manual 02
1) Stage J(Journey)
Introduction
Selection:
Selection means selecting a set of statements for execution under a certain condition, the condition should a logical test involving logical and relational operators, e.g. display A/B only when B is not equal to zero, means we have to test B for the specific value of zero.
Iteration or Looping:
Iteration means repetition i.e. to repeat a set of statements a certain number of times or to repeat the statements until a specific condition is met, e.g. if the user enters a negative value for his age then ask him to enter the age repeatedly until he enters a value greater than zero. Raptor uses the symbol for looping.
2) Stage a1 (apply)
Lab Activities:
Activity 1:
Draw a flowchart that tells user whether the Integer entered is Even or Odd Number, use % symbol to test the remainder value.
Activity 2:
Draw a flowchart to accept two values from user and display the larger one.
Solution:
Activity 3:
Draw a flowchart for a program that reads two numbers and displays the number series from first to last number.
3) Stage v(verify)
Home Activities:
- Draw a flow chart to calculate the Sum of series from Starting to Ending Number, the increment per cycle is also entered by the user.
- Construct flow chart to Calculate Factorial of a Number entered by the user.
4) Stage a2(assess)
Lab Assignment and Viva voce
Statement Purpose:
This lab covers the following topics:
- Install NetBeans
- Getting Started with NetBeans
- Creating a Project
- Creating a Class
- Compiling a Class
- Running a Java Application
- Forcing a Program to Terminate
This tutorial applies to NetBeans 6, 7, or a higher version.
Activity Outcomes:
This lab teaches you the following topics:
- Installing java
Create first java program
Comments
Post a Comment