String Variables In the Percentage Calculator program of the previous section, we used variables to store numeric data. Quite often we want variables to store textual data, for example, the name of a student. A variable of the primitive data type char can be used to store a single character. To assign a value to a char variable we enclose the character between single quotes. char middle_name = ‘M’; To store...
Continue reading »
February 27, 2016 evirtualguru_ajaygourOnline Computer EducationNo Comment
Primitive Data Types Besides the two Java data types (int, double) that you have seen in the percentage calculator program, we can use six more data types. In all, Java supports eight primitive data types as in Table 1. STYLE TIP – Variable Names 1. Variable names can begin with either an alphabetic character, an underscore (_), or a dollar sign ($). However, convention is to begin a variable name with...
Continue reading »
February 27, 2016 evirtualguru_ajaygourOnline Computer EducationNo Comment
Data Types and Variables In the previous section, you learnt how to write and execute a simple Java program. This time let us write a program that does something a little more useful than just display a message. We will write a program that handles data. Given the marks obtained by a student and the total number of marks for an exam, our program will calculate the percentage obtained by the...
Continue reading »
February 26, 2016 evirtualguru_ajaygourOnline Computer EducationNo Comment
Write a simple Java program that prints a Welcome Message (“Hello World”) on the screen. Since this will be your first Java program, you will first need to setup the programming environment (Refer to Appendix A for installation and starting NetBeans). Step 1: Double click the NetBeans icon on your computer to start NetBeans. Java will open the NetBeans IDE (Figure 1.1a). Step 2: All development in NetBeans is placed within...
Continue reading »
February 26, 2016 evirtualguru_ajaygourOnline Computer EducationNo Comment
Introduction to Java Welcome to “Fundamentals of Java Programming”! In this unit, you will learn to write and execute Java programs. But before you start writing one, it is important to know what a program is. A computer program is a sequence of instructions given to the computer in order to accomplish a specific task. The instructions tell the computer what to do and how to do it. Programming is...
Continue reading »
February 26, 2016 evirtualguru_ajaygourOnline Computer EducationNo Comment
Operating Web Based Application 1. Operating Web-based Applications 2. Online Reservation Systems 3. Advantages of online reservation system 4. Using Online Reservation Systems 5. E-Governance 6. E-Governance Sites 7. Online Shopping and Bill payments 8. Online Tutoring Sites 9. Project Management – Web Based Application development 10. Case Study – Online Game, Online Quiz, Online Bill Calculator
Continue reading »
February 25, 2016 evirtualguru_ajaygourOnline Computer Education1 Comment
Case Study – Online Game Let us now define the problem statement for the online game. Here, we create an online game called Hangman. It is a simple guessing game where a player has to guess the word which may belong to a category like, movie, country name etc. Let us create this game. Problem Statement:Hangman is a popular word game. In this game, a player selects a category like,...
Continue reading »
February 25, 2016 evirtualguru_ajaygourOnline Computer EducationNo Comment
Project Management – Web Based Application development A web application is a program that is stored on a remote server. A web application is online as it is delivered over the Internet through a web browser interface. A web application may be of different kinds, like, a quiz, a game or a bill calculator. Web based application development involves the process of developing web applications. A project is a task that is undertaken...
Continue reading »
February 20, 2016 evirtualguru_ajaygourOnline Computer EducationNo Comment