Skip to main content

Posts

Showing posts from 2013

simple basic object oriented java code for employee salary calculation

import java.io.*; import java.util.Scanner; public class Employees {     Scanner scan=new Scanner(System.in);     String Fname;   int EmpID;  int DOB; double Allowance;   double Salary;     public void getDetails(){   System.out.println("Enter the first name");   Fname=scan.next();   System.out.println("Enter the ID number");   EmpID=scan.nextInt();   System.out.println("Enter the date of birth");   DOB=scan.nextInt();   System.out.println("Enter the salary");   Salary=scan.nextDouble();   Allowance=0.6*Salary;     }    public void printReport(){    System.out.println(Fname+"\t"+EmpID+"\t"+calGross()+"\t"+calPayee()+"\t"+calNetIncome());    }    public double calGross(){        return Salary + Allowance;    }    public double calPayee(){     ...

use cases,Activity diagrams

use cases Advantages: Nice way to wak through use cases to test your design. Nice to use when talking and developing in a team. Once you have the design down the coding can be stubbed out so that testing and developing can be done by more than one person. Easy to write up simple ones on a white-board. Disadvantage: they are usually not documents that are kept up to date so they don't work well as long-term documentation Activity diagrams' disadvantages: UML modeling language include that these diagrams have the potential to become overly complex because their user-friendly nature may lend itself to an all-inclusive description. In other words, since it is so simple to display the information related to the project, why not include all of it? When an analyst has a large project, creating a single, overly complex diagram can be a temptation. However, as one author notes, "if you are using activity diagrams to define the structure of a work flow, you should...

sequence diagrams

A sequence diagram shows, as parallel vertical lines ( lifelines ), different processes or objects that live simultaneously, and, as horizontal arrows, the messages exchanged between them, in the order in which they occur. This allows the specification of simple runtime scenarios in a graphical manner. Sequence diagrams are typically used to model: Usage scenarios .  A usage scenario is a description of a potential way your system is used. The logic of a usage scenario may be part of a use case, perhaps an alternate course. It may also be one entire pass through a use case, such as the logic described by the basic course of action or a portion of the basic course of action, plus one or more alternate scenarios. The logic of a usage ...

MYSQL DATABASE ENVIRONMENT BASICS

When you open the client, you will be prompted to enter the password for the root account. This is the password that was previously configured. Type the password and hit Enter. You should see that you have entered the MySQL environment: To create a database, type the following command: CREATE DATABASE uestudio_sample; where "uestudio_sample" is the name of the database. Note: be sure to include the semi-colon at the end of the command. If the command is successful you will see something similar to: Query OK, 1 row affected (0.00 sec) You may verify that the databases have been created by using the " Show Databases " command. If you type, "Show Databases;" and hit enter, you should see something similar to: Create a Table For the purposes of this Power Tip, we will create a table called "names" that includes the following fields: key, first, last. You may create this table using the following steps: Type: ...

Create a Local PHP MySQL Development Environment

Step 1. Download the installation files You will need to download and install the windows version of the installers for each of the below componments: Apache Apache is the HTTP (Web) server software. http://httpd.apache.org/download.cgi PHP PHP is the general-purpose scripting language, especially suited for Web development, that we will be using. http://www.php.net/downloads.php MySQL Server http://dev.mysql.com/downloads/mysql/5.0.html#win32 Step 2: Install Apache Run the Apache install file. You will need to follow the prompts and respond accordingly. When you reach the window that asks for server information, you may enter the following: Network Domain: localhost Server Name: localhost Administrator Email: (any email address) Also ensure the "for all Users, on Port 80, as a Service -- Recommended" is checked.  Continue clicking " Next " until the installation is complete. If Apache has been installed correctly, and the s...

Simple java class code that implements Serializable,ServerSocket, InputStream,ObjectInputStream, Socket

import java.net.*; import java.io.*; class ShopItem implements Serializable{     int shopid;     String name;     float cost;     public ShopItem(int id, String s, float c){         this.shopid=id;         this.name=s;         this.cost=c;     } } public class ObjectServer {     public static void main(String args[]){         int port=2002;         try{            ServerSocket ss=new ServerSocket(port);            Socket s=ss.accept();            InputStream is=s.getInputStream();            ObjectInputStream ois=new ObjectInputStream(is);            ShopItem to=(ShopItem)ois.readObject();            if(to!=null){   ...

GOOD WEB DESIGN

W ith good Web design, visitors should be able to quickly understand what they are looking at on a Web page without thinking about it. Simplicity should act as a guide in all Web-based communication. Consider the following tips: 1) Build your website with public relations in mind. Your club’s online presence can directly affect your  public image. A visit to your site must not only meet your clients expectations but also offer something of interest for the general public, including prospective members or other community groups wishing to partner with. Some questions to consider: Who is your target audience? What are the objectives of your website? What should a visitor expect from your site? What do you want the visitor to leave with? 2) Provide accurate contact information and an easy way for prospective members to express interest in your club and learn more about joining. Provide more than one way to be contacted, such as a phone number and an e-mail addre...

Data mining, Data warehousing, Data marts, DATA MINING TECHNIQUES AND THEIR APPLICATION

(i)                  Data mining Data mining (sometimes called data or knowledge discovery) is the process of analyzing data from different perspectives and summarizing it into useful information - information that can be used to increase revenue, cuts costs, or both. Data mining software is one of a number of analytical tools for analyzing data. It allows users to analyze data from many different dimensions or angles, categorize it, and summarize the relationships identified. Technically, data mining is the process of finding correlations or patterns among dozens of fields in large relational databases. Data mining is primarily used today by companies with a strong consumer focus - retail, financial, communication, and marketing organizations. It enables these companies to determine relationships among "internal" factors such as price, product positioning, or staff skills, and "external" facto...

Ten output devices, advantages and disadvantages, inter-site back-up mechanism, Expert systems for medical diagnosis,information systems security

(i)Printer Printer enables us to produce information output on paper. It is one of the most popular computer output devices we often use to get information on paper - called hard copy. Advantage They produce high quality paper output for presentation at a speedy rate. It is also possible to share the printer among different users in a network. Disadvantage The cost for maintenance of the printer equipment as well printing ink is cumulatively high. (ii) Plotters These devices are used to produce graphical outputs on paper. They have automated pens that make line drawings on paper Advantage They can produce neat drawings on a piece of paper based on user commands. In Computer Aided Design (CAD) they are used to produce paper prototypes that aid in design of the final system. Disadvantage They are more expensive than printers. Further, the command based interface is difficult to use. (iii)Monitor It is...