Tuesday, 14 November 2017

Liferay DXP – Why When What Who

Liferay DXP – Why When What Who



What is Liferay DXP? or What is Java Liferay? or What is Liferay in it? or What language is Liferay written in?.

In 2016 Gartner accredited Liferay as a leader in the Magic Quadrant for Horizontal Portals for the seventh year in a row based on parameters such as market understanding, sales strategy, innovation, core product and services offerings, financial health, customer experience and market responsiveness. It was the same year when Liferay introduced next level of its enterprise edition as Liferay DXP that got a warm welcome from both the developer community and the enterprise.



Why Liferay DXP


Liferay DXP is a revolutionary version of Liferay that has entitled it as a competent technology platform rather than an enterprise portal solution.

Strategically Developed Mature Product

  • Liferay DXP is a mature technology platform that has been innovated and launched after a significantly successful journey of Liferay

  • You can get developed a highly customized solution that can match with any specific, comprehensive or complex requirements along with remarkable performance

Intelligent Investment

  • Liferay DXP can be considered as an intelligent investment as it offers resilient and dynamic technology low TCO and high ROICost effective to maintain and to scale with growth and time 
  • Well-equipped open source with built-in resources, hence you don’t need to pay for additional features
  • Lower ancillary and scaling costs due to better supports to more choices for hardware and software compatibility

Trouble-free Adoption


  • Quick configuration and secured implementation with easily adaptable and reusable presentation layer

  • Optimum User Interface, familiar desktop conveniences, and easy navigations enables easy adoption of solution across the enterprise

Agility for the Future

  • As and when required either for operational excellence or for competitive advantage, it is easy to add new functionalities and tools to your existing solution


When Liferay DXP


For logical mapping between Enterprise Architecture and Information Technology strategy

  • In general, the concept of Enterprise Architecture is mainly about structuring the logic for various business processes aligned with the enterprise’s growth plan. IT strategies are developed and implemented to standardize the business processes in line with company’s operating model with minimized possibilities of risk. Liferay DXP is the right tool to create potential sync between Enterprise Architecture and Information Technology strategy of a visionary enterprise.

  • In a practical scenario, such sync is created through technology solutions that work as a digital workplace and collaboration platform across the enterprise’s internal and external business ecosystem along with providing a personalized experience to its every user. Liferay DXP empowers you to create a winning combination of an excellent user experience encompassing all modern trends of digital interactions and substantial technological capabilities for optimized business process operations

What is Liferay DXP



  • Liferay DXP is a feature-rich enhanced digital experience platform that enables the development of cost-effective integrated technology solutions including content-rich web applications and enterprise portals that are easily adaptive to mobility

  • It is an effective tool to handle digital transformation throughout the enterprise and being used by many well-known global organizations including Airbus, Allianz, Domino’s, T-Mobile, Schneider, and NASA

Who should opt for Liferay DXP


If you are on the way of manifesting an idea into innovation

  • Once the business vision is clear, the critical components of manifesting an idea into innovation are: Engaging product design in line with nature of business, flexibility, and scalability of the proposed solution, security, and great analytical capabilities, seamless integration of the most suitable technologies and distinctive user experience

  • Liferay DXP is the right technology platform for you to conceptualize an idea into a solution encompassing the latest and futuristic aspects of innovative solution 

If you are willing to simplify and drive the agility for operational excellence as well as competitive advantage

When you are in need of an automated technology solution that can be used as organizational productivity booster and enables you:

  • To furnish your employees with secured, consistency and role-based access to organizational documents and information without any geographical limitations
  • To handle Enterprise Content Management and Web Publishing smartly in line with all up to the minute trends
  • To streamline customer communications through a collaborated platform using multiple touch points

Liferay DXP enables the development of massive, complex and integrated technology applications specifically designed not only to address each of your business challenges but also act as a potential driving force for your business.

Conclusion


When it comes to the selection of right technology, analytical and fact-based approach plays a critical role in making a fruitful decision. All in all, Liferay DXP provides the practical solution that actually works. Additionally, with low TCO and adequate ROI, it is flexible enough to drive strategic growth for the future. Apart from being used and acknowledged by globally leading organizations, Liferay DXP is strongly advocated by technology experts as well due to the functional beauty and technical capabilities.


Author of This Post


Author Bio: Namee Jani is a Passionate Sr.Digital Marketing Strategist working with Azilen Technologies. She is Certified Google Adwords & Analytics and adores catching new trends and techniques prevalent in online marketing world. Click Here for more information about Author
Read More »

Computer Programming for Beginners

Computer Programming for Beginners or computer programming course for beginners or computer programming jobs for beginners or computer programming classes for beginners or computer programming top colleges/Institution in India.

Table of Content


1. The Computer

2. What is Programming Language

3. Top College/University

4. Choosing The Programming Language

5. The Career in Computer Programming.


1. The Computer


The computer is one of the finest outcomes of technological advancement. Usually when you use a computer it direct things like, if you want to access the 'My Computer', you double-click on 'My Computer' and access the drive which you want to view but it is not that easy because such a computer is programmed to do the commanded tasks. This article is about telling the beginners about the programming and how if they are interested in it they can go for it as a full-fledged career or they can learn to programme as an interest-based learning.


Computer Programming for Beginners

2. What is Programming Language


Programming is a set of instructions which we use in programming which involves activities such as analysis, developing understanding, generating algorithms, verification of requirements of algorithms including their correctness and resources consumption, and implementation. This is commonly referred to as coding of algorithms in a target programming language. Programming is used for software development, website development, and all other functions you can think of which are conducted by a computer. All the functions in a computer are programmed to do so. The programming is a base for all the computer operations.



3. Top College/University


There are Top Engineering Colleges in India offering certified courses on software programming, software development, and information technology, visual graphics. All these are certified programs offered by these top colleges who are competing with other top colleges all around the globe. Students can also search for top MBA Colleges in Karnataka, as Karnataka is doing well in the field of engineering and emerging as one of the finest state offering technical courses,

While going for a course on programming, students should know which language they should start from but not get hung up on choosing languages. There are various languages to choose from PHP, Jquery [Website Development], Android, Python [Mobile Software Development], Java [Software Development], C language and various other languages which a beginner can choose from to learn programming.



4. Choosing The Programming Language


After deciding which programming language, then it's all about how you use it for software developments. This is what programming is all about. The programmer's job is to convert and create a problem-solution kind of algorithm as instructions for a computer such as - when you want to find out a nearby restaurant and Google maps do it easily for you, the problem and solution for that is provided by the programmer. When someone types 'nearby restaurants' on the maps it will display all the keywords matching to restaurants and which are nearby to users. That how programming works as it was set in the command how it will go about functioning.



5. The Career in Computer Programming


There are a lot of career opportunities for computer programmers because of the rapid technological advancement and students can opt for the various different fields of programming itself. There are fields such as web designing, software development, developing game and others. If programming is where your interest lies you should go for it and be updated with the new developments in that field. Passion is driving force for satisfaction in any field.



Author of This Post


Kishore Kumar is a well-known blogger and content writer. If you have any Query/complain/suggestions regarding this post, you can comment or contact to author of this post. You can always read his posts on www.getmyuni.com to know how to reach your objectives easily. Know more about Kishore Kumar Click here.
Read More »

Monday, 6 November 2017

HackerRank Solution For Day 28: RegEx, Patterns, And Intro to Databases

Problem:- hackerRank-30-Days-of-Code/Day-28-RegEx-Pattern or Hackerrank, 30 Days of Code Challenges or Hackerrank 30 days of code Java Solution: Day 28 or HackerRank - Advance Your Coding Through Problem Solving or 30 Days of Code – Day 28: RegEx, Patterns, and Intro to Databases or C Language: HackerRank Day 28 Data Types 30 Day Solution In C or Day 28: RegEx, Patterns, and Intro to Databases or The 30 Days Regex Tutorial

Task

Consider a database table, Emails, which has the attributes First Name and Email ID. Given N rows of data simulating the Emails table, print an alphabetically-ordered list of people whose email address ends in @gmail.com (RegEx Pattern)

Sample Input

6
riya riya@gmail.com
julia julia@julia.me
julia sjulia@gmail.com
julia julia@gmail.com
samantha samantha@gmail.com
ghanendra ghanendra.yadav@gmail.com


Sample Output

ghanendra
julia
julia
riya
samantha

Output Format

Print an alphabetically-ordered list of first names for every user with a Gmail account. Each name must be printed on a new line.

Explanation:- RegEx, Patterns, and Intro to Databases Solution is same as SQL Query. First, we have database table consist first name and email Now we have to print the name of the person whose email ID ends with @gmail.com. So first step is to take a regular expression in like this "regex exp(".+@gmail\\.com$");" and now with the help of sting array we will take an input Fname and Eid and compare Eid with a regular expression If Eid is matched with a regular expression then we store name of the person in a String array. Now the last step is to print the string array in order.
For better explanation let's take an example of above Sample Input, here number 6 ( total number of input ) and a first name and Email ID. As you can see the first email is riya@gmail.com this is correct so store or push into a string array, now come to second Email ID julia@julia.me as we can see there is no matching with @gmail.com than ignore this name and Email ID same for next and next to next and continue all have passed the condition. Now next step is to print the First name in ascending order.


Solution:- Day 28: RegEx, Patterns, and Intro to Databases Solution

#include <bits/stdc++.h>
using namespace std;

int main()
{
    int N, i;

    cin >> N;

    regex exp(".+@gmail\\.com$");

    vector<string> strarray;

    for(i = 0; i < N; i++)
{
        string Fname;

        string Eid;

        cin >> Fname >> Eid;

        if(regex_match(Eid, exp))
{
            strarray.push_back(Fname);
        }
    }

    sort(strarray.begin(), strarray.end()); 

    for(i = 0; i < strarray.size();i++) 
    { 
        cout << strarray[i] << endl; 
    }

    return 0;
}

Output:-

HackerRank solution For Day 28: RegEx, Patterns, and Intro to Databases

You May Also See


1. Day 24: More Linked Lists

2. Day 25: Running Time and Complexity

3. Day 26: Nested Logic

4. Day 27: Testing

5. Day 29: Bitwise AND
Read More »

Hospital Management System Project in java

Problem:- Hospital Management in JAVA or Hospital Management System or Hospital Management System Project in java or Hospital Management Java Project or java codes on hospital management or Hospital Management System in JAVA or Hospital Management System Project for Final Year or Hospital Management in JAVA (Computer Project)  or CSE Final Year Projects Hospital Management in JAVA or Free Download Hospital Management System Java Project With Source Code or Java Projects Hospital Management system

Explanation:- Hospital Management is very popular projects, In this project, I cover 1.DOCTOR  2. PATIENT  3.MEDICAL  4.LAB  5. FACILITY  6.STAFF tables. Now take an example of Doctor table, I already saved some doctor details, when you select option 1.Doctor than 2 option will occur and 1.new entry or 2.doctor list Here you can save the details of New Doctor like Below.

Id:-
Name:-
Specialization:-
Working Time:-
Qualification:-
Room No:-

and you can see the new updated list of the doctors and by pressing 2 you can see those details Check Below. 

2.doctor list
--------------------------------------------------------------------------------------------
id       name              specialist       timing          qualification   room no
--------------------------------------------------------------------------------------------
21      Dr.Ghanendra    ENT           10-04             MBBS, MD         17
32      Dr.Vikram          Physician    10-04             MBBS, MD         45
17      Dr.Rekha          Child            10-04             BDM                   8
33      Dr.Pramod        Artho           10-04             MBBS, MS         40
17      Dr.Yadav           Artho            08-12            MBBS                12

In Hospital Management System you can also check the patient list or you can admit new patient same as Doctor List for that you have to go the main menu and select patient than 2 option will occur 1.new entry or 2.patient list and by pressing 2 you can check the patient details. these are the list of my friend and they are not patient they are absolutely fine(Just for Fun).

2.patient list
--------------------------------------------------------------------------------
id       name       disease         sex     admit_status    age
--------------------------------------------------------------------------------
12      Pankaj    cancer          male            y               30
13      kuli          cold              male            y               23
14      Gaurav   Malaria         male            y               45
15      Ravi        sugar           male             y               25


Solution:- Hospital Management System Project in java

import java.io.*;
import java.util.*;
import java.util.Calendar;

/* Program By Ghanendra Yadav
    Visit http://www.programmingwithbasics.com/
*/

class staff
{
String sid,sname,desg,sex;
int salary;
void new_staff()
{
Scanner input=new Scanner(System.in);
System.out.print("id:-");sid=input.nextLine();
System.out.print("name:-");sname=input.nextLine();
System.out.print("desigination:-");desg=input.nextLine();
System.out.print("sex:-");sex=input.nextLine();
System.out.print("salary:-");salary=input.nextInt();
}
void staff_info()
{
System.out.println(sid+"\t"+sname+"\t"+sex+"\t"+salary);
}
}


class doctor
{
String did,dname,specilist,appoint,doc_qual;
int droom;

void new_doctor()
{
Scanner input=new Scanner(System.in);
System.out.print("id:-");did=input.nextLine();
System.out.print("name:-");dname=input.nextLine();
System.out.print("specilization:-");specilist=input.nextLine();
System.out.print("work time:-");appoint=input.nextLine();
System.out.print("qualification:-");doc_qual=input.nextLine();
System.out.print("room no.:-");droom=input.nextInt();
}
void doctor_info()
{
System.out.println(did+"\t"+dname+"  \t"+specilist+"     \t"+appoint+"    \t"+doc_qual+"       \t"+droom);

}
}


class patient
{
String pid,pname,disease,sex,admit_status;
int age;

void new_patient()
{
Scanner input=new Scanner(System.in);
System.out.print("id:-");pid=input.nextLine();
System.out.print("name:-");pname=input.nextLine();
System.out.print("disease:-");disease=input.nextLine();
System.out.print("sex:-");sex=input.nextLine();
System.out.print("admit_status:-");admit_status=input.nextLine();
System.out.print("age:-");age=input.nextInt();
}
void patient_info()
{
System.out.println(pid+"\t"+pname+" \t"+disease+"     \t"+sex+"      \t"+admit_status+"\t"+age);
}
}


class medical
{
String med_name,med_comp,exp_date;
int med_cost,count;

void new_medi()
{
Scanner input=new Scanner(System.in);
System.out.print("name:-");med_name=input.nextLine();
System.out.print("comp:-");med_comp=input.nextLine();
System.out.print("exp_date:-");exp_date=input.nextLine();
System.out.print("cost:-");med_cost=input.nextInt();
System.out.print("no of unit:-");count=input.nextInt();
}
void find_medi()
{
System.out.println(med_name+"  \t"+med_comp+"    \t"+exp_date+"     \t"+med_cost);
}
}

class lab
{
String fecility;
int lab_cost;

void new_feci()
{
Scanner input=new Scanner(System.in);
System.out.print("fecility:-");fecility=input.nextLine();
System.out.print("cost:-");lab_cost=input.nextInt();
}
void feci_list()
{
System.out.println(fecility+"\t\t"+lab_cost);
}
}


class fecility //Sorry Facility but do not change the name 
{

String fec_name;
void add_feci()
{
Scanner input=new Scanner(System.in);
System.out.print("fecility:-");fec_name=input.nextLine();

}
void show_feci()
{
System.out.println(fec_name);
}
}


public class HOSPITALMGT
{
public static void main(String args[])
{
String months[] = {
"Jan", "Feb", "Mar", "Apr",
"May", "Jun", "Jul", "Aug",
"Sep", "Oct", "Nov", "Dec"};
Calendar calendar = Calendar.getInstance();
//System.out.println("--------------------------------------------------------------------------------");
int count1=4,count2=4,count3=4,count4=4,count5=4,count6=4;

System.out.println("--------------------------------------------------------------------------------");
System.out.println("                          ***HOSPITAL MANAGEMENT SYATEM***");
System.out.println("--------------------------------------------------------------------------------");
System.out.print("Date: "+months[calendar.get(Calendar.MONTH)]+" " + calendar.get(Calendar.DATE) + " "+calendar.get(Calendar.YEAR));
System.out.println("\t\t\t\t\t\tTime: "+calendar.get(Calendar.HOUR) + ":"+calendar.get(Calendar.MINUTE) + ":"+calendar.get(Calendar.SECOND));

doctor[] d=new doctor[25];
patient[] p=new patient[100];
lab[] l=new lab[20];
fecility[] f=new fecility[20];
medical[] m=new medical[100];
staff[] s=new staff[100];
int i;
for(i=0;i<25;i++)
d[i]=new doctor();
for(i=0;i<100;i++)
p[i]=new patient();
for(i=0;i<20;i++)
l[i]=new lab();
for(i=0;i<20;i++)
f[i]=new fecility();
for(i=0;i<100;i++)
m[i]=new medical();
for(i=0;i<100;i++)
s[i]=new staff();

d[0].did="21"; d[0].dname="Dr.Ghanendra"; d[0].specilist="ENT"; d[0].appoint="10-4"; d[0].doc_qual="mbbs,Md"; d[0].droom=17;   
d[1].did="32"; d[1].dname="Dr.Vikram"; d[1].specilist="medi."; d[1].appoint="10-4"; d[1].doc_qual="mbbs,md"; d[1].droom=45;   
d[2].did="17"; d[2].dname="Dr.Rekha"; d[2].specilist="Child spl"; d[2].appoint="10-4"; d[2].doc_qual="bdm"; d[2].droom=8;   
d[3].did="33"; d[3].dname="Dr.Pramod"; d[3].specilist="Artho"; d[3].appoint="10-4"; d[3].doc_qual="mbbs,ms"; d[3].droom=40;   

p[0].pid="12"; p[0].pname="pankaj"; p[0].disease="cancer"; p[0].sex="male"; p[0].admit_status="y"; p[0].age=30; 
p[1].pid="13"; p[1].pname="kuli"; p[1].disease="cold"; p[1].sex="male"; p[1].admit_status="y"; p[1].age=23; 
p[2].pid="14"; p[2].pname="Gaurav"; p[2].disease="maleriya"; p[2].sex="male"; p[2].admit_status="y"; p[2].age=45; 
p[3].pid="15"; p[3].pname="ravi"; p[3].disease="sugar"; p[3].sex="male"; p[3].admit_status="y"; p[3].age=25; 

m[0].med_name="corex"; m[0].med_comp="cino pvt"; m[0].exp_date="9-5-16"; m[0].med_cost=55; m[0].count=8;
m[1].med_name="nytra"; m[1].med_comp="ace pvt"; m[1].exp_date="4-4-15"; m[1].med_cost=500; m[1].count=5;
m[2].med_name="brufa"; m[2].med_comp="reckitt"; m[2].exp_date="12-7-17"; m[2].med_cost=50; m[2].count=56;
m[3].med_name="pride"; m[3].med_comp="ddf pvt"; m[3].exp_date="12-4-12"; m[3].med_cost=1100; m[3].count=100;

l[0].fecility="x-ray     "; l[0].lab_cost=800;
l[1].fecility="ct scan   "; l[1].lab_cost=1200;
l[2].fecility="or scan   "; l[2].lab_cost=500;
l[3].fecility="blood bank"; l[3].lab_cost=50;

f[0].fec_name="ambulane";
f[1].fec_name="admit fec";
f[2].fec_name="canteen";
f[3].fec_name="free camp";

s[0].sid="22"; s[0].sname="ravi"; s[0].desg="worker"; s[0].sex="male"; s[0].salary=5000;
s[1].sid="23"; s[1].sname="komal"; s[1].desg="nurse"; s[1].sex="female"; s[1].salary=2000;
s[2].sid="24"; s[2].sname="raju"; s[2].desg="worker"; s[2].sex="male"; s[2].salary=5000;
s[3].sid="25"; s[3].sname="rani"; s[3].desg="nurse"; s[3].sex="female"; s[3].salary=20000;

Scanner input=new Scanner(System.in);

int choice,j,c1,status=1,s1=1,s2=1,s3=1,s4=1,s5=1,s6=1;
while(status==1)
{
System.out.println("\n                                    MAIN MENU");
System.out.println("--------------------------------------------------------------------------------");
System.out.println("1.DOCTOR  2. PATIENT  3.MEDICAL  4.LAB  5. FACILITY  6.STAFF 7.EXIT");
System.out.println("--------------------------------------------------------------------------------");

choice=input.nextInt();
switch(choice)
{
case 1:
   {
System.out.println("--------------------------------------------------------------------------------");
   System.out.println("                      **DOCTOR SECTION**");
   System.out.println("--------------------------------------------------------------------------------");
   s1=1;
   while(s1==1)
   {
    System.out.println("1.new entry\n2.doctor list");
    c1=input.nextInt();
    switch(c1)
    {
    case 1:
      {
      d[count1].new_doctor();count1++;
      break;
      }
    case 2:
      {
      System.out.println("--------------------------------------------------------------------------------");
      System.out.println("id \t name\t specilist \t timing \t qualification \t room no");
      System.out.println("--------------------------------------------------------------------------------");
     for(j=0;j<count1;j++)
       {
       d[j].doctor_info();
       }
      break;
      }
     }
     
     System.out.println("RETURN BACK press (1/0) for more");
     s1=input.nextInt();
    }
    break;
 }
case 2:
{
System.out.println("--------------------------------------------------------------------------------");
System.out.println("                     **PATIENT SECTION**");
System.out.println("--------------------------------------------------------------------------------");
s2=1;
while(s2==1)
{
System.out.println("1.new entry\n2.patient list");
c1=input.nextInt();
switch(c1)
{
case 1:{p[count2].new_patient();count2++;break;}
case 2:
{
System.out.println("--------------------------------------------------------------------------------");
System.out.println("id \t name \t disease \t sex \t admit_status \t age");
System.out.println("--------------------------------------------------------------------------------");
for(j=0;j<count2;j++){p[j].patient_info();}break;}
}
System.out.println("RETURN BACK press (1/0) for more");
s2=input.nextInt();
}
break;
}
case 3:
{
s3=1;
System.out.println("--------------------------------------------------------------------------------");
System.out.println("                     **MEDICAL SECTION**");
System.out.println("--------------------------------------------------------------------------------");
while(s3==1)
{
System.out.println("1.new entry\n2.medicine list");
c1=input.nextInt();
switch(c1)
{
case 1:{m[count3].new_medi();count3++;break;}
case 2:
{
System.out.println("--------------------------------------------------------------------------------");
System.out.println("name \t company \t expirity date \t cost");
System.out.println("--------------------------------------------------------------------------------");
for(j=0;j<count3;j++){m[j].find_medi();}break;}
}
System.out.println("RETURN BACK press (1/0) for more");
s3=input.nextInt();
}
break;
}
case 4:
{
s4=1;
System.out.println("--------------------------------------------------------------------------------");
System.out.println("                    **LABORATRY SECTION**");
System.out.println("--------------------------------------------------------------------------------");
while(s4==1)
{
System.out.println("1.new entry \n2.lab list");
c1=input.nextInt();
switch(c1)
{
case 1:{l[count4].new_feci();count4++;break;}
case 2:
{
System.out.println("--------------------------------------------------------------------------------");
System.out.println("fecility\t\tcost");
System.out.println("--------------------------------------------------------------------------------");
for(j=0;j<count4;j++){l[j].feci_list();
}
break;
}
}
System.out.println("RETURN BACK press (1/0) for more");
s4=input.nextInt();
}
break;
}
case 5:
{
s5=1;
System.out.println("--------------------------------------------------------------------------------");
System.out.println("          **HOSPILITY FACILITY SECTION**");
System.out.println("--------------------------------------------------------------------------------");
while(s5==1)
{
System.out.println("1.new entry\n2.fecility list");
c1=input.nextInt();
switch(c1)
{
case 1:{f[count5].add_feci();count5++;break;}
case 2:{
System.out.println("--------------------------------------------------------------------------------");
System.out.println("hospility facility are:-");
System.out.println("--------------------------------------------------------------------------------");
for(j=0;j<count5;j++){f[j].show_feci();}break;}
}
System.out.println("RETURN BACK press (1/0) for more");
s5=input.nextInt();
}
break;
}
case 6:
{
s6=1;
System.out.println("--------------------------------------------------------------------------------");
System.out.println("                       **STAFF SECTION**");
System.out.println("--------------------------------------------------------------------------------");
  while(s6==1)
  {

String a="nurse",b="worker",c="security";
   System.out.println("1.new entry\n2.nurse list\n3.worker list \n4.securuty list");
   c1=input.nextInt();
   switch(c1)
   {
     case 1:{s[count6].new_staff();count6++;break;}
     case 2:
       {
System.out.println("--------------------------------------------------------------------------------");

       System.out.println("id \t name \t sex \t salary");
System.out.println("--------------------------------------------------------------------------------");
         for(j=0;j<count6;j++)
         {
         if(a.equals(s[j].desg))
            s[j].staff_info();
         }
       break;
       }
     case 3:
       {
System.out.println("--------------------------------------------------------------------------------");
       System.out.println("id \t name \t sex \t salary");
System.out.println("--------------------------------------------------------------------------------");
       for(j=0;j<count6;j++)
         {
         if(b.equals(s[j].desg))
            s[j].staff_info();
         }
       break;
       }
     case 4:
       {
System.out.println("--------------------------------------------------------------------------------");
       System.out.println("id \t name \t sex \t salary");
System.out.println("--------------------------------------------------------------------------------");
        for(j=0;j<count6;j++)
        {
        if(c.equals(s[j].desg))
        s[j].staff_info();
        }
       break;
       }
    }
   System.out.println("RETURN BACK press (1/0) for more");
   s6=input.nextInt();
   }
break;
}
case 7:
{
break;
}
default:
{
System.out.println("enter wrong choice!");
}
}
System.out.println("RETURN MAIN MENU press (1/0) for more");
status=input.nextInt();
}
}
}

Output:-

Hospital Management System Project in java

You May Also See



1. Java Program For Calculator Using AWT Controls (GUI)

2. JAVA Project SMS (School Management System) Using Multiple Classes

3. C++ Program For Student Report Card ( SRC PROJECT ) With Source Code

4. C++ Tic Tac Toe Game Project With Source Code

5. C++ Program For School Management System ( SMS Project ) With Source Code
Read More »

Saturday, 4 November 2017

An Applet Program That Print Random Dot in Java

Problem:- Write an applet program in Java that display Random dot in screen or An applet program that displays random dot or Draw Dots at Random Locations in an Applet Example or java - Drawing random points in JApplet or java - Simplest way to display a window with dots on it or arrays - dot random movement in java or Random Dots or Java Random Number Examples or A program of the applet that draws a dot at a random location in its or An Applet Program That Print Random Dot in Java or Draw Dots at Random Locations in an Applet Example.

Explanation:- This is a very interesting problem, your task is to print random dots on the screen. while you can also control the speed of dots and color of dots. Now come to point first you to copy this program and save with .java extension, now press the win+R key and enter CMD and press Enter. Now locate the program where you save it with the help of CD command ie.- "cd Desktop". If you are getting problem how to run applet program in java via command link check this How to Run Java Applets and Swing Using Command Line. Now just open and run the program and see the magic.

Now Come to technical terms of this program ie. How drawing random points in JApplet is working. So basically there are 6 steps.

1. public void init()
2. public void run()
3. Thread.sleep(1)
4. public void paint(Graphics g)
5. g.fillOval(x,y,10,10)
6. g.setColor(Color.red)


1. public void init()

public void init is used for initialization of the Thread, this is the first process.

2. public void run()

the public void run is responsible for the run the thread and catching if any exception occurs, you can put condition theirs. how many time you want to run the Loop etc.

3. Thread.sleep(Integer Value)

Thread.sleep(1000) is used for sleep The Thread means no operation will be performed for a given time, here 1000 means 1 Second and 1 means 1/1000 Second. So for a given time, no operation will be performed and the program will be Idle for a given time.

4. public void paint(Graphics g)

Performing a painting and drawing task, here color and shape decide.

5. g.fillOval(x, y, 10, 5)

This is a property of filling a color in any shape here is an X-Axis and y is a Y-Axis and 10 and 5 is the size of an Oval(Height and Width) but in Applet X-Axis is Left to Right and Y- Axis is Top to Bottom.

6. g.setColor(Color.red)

This is a property of the coloring a shape.


Solution:- Draw Dots at Random Locations in an Applet


import java.applet.Applet;
import java.awt.*;

/* Program By Ghanendra Yadav
    Visit http://www.programmingwithbasics.com/
*/
/*
        <applet code = "DRAWDOTSRANDOM" width = 600 height = 400>
        </applet>
*/
public class DRAWDOTSRANDOM extends Applet implements Runnable
{  
    Thread t;
    public void init()
{              
        t = new Thread(this);
        t.start();
    }
       
    public void run()
{   
        try
{      
            while(true)
{
                repaint();
                Thread.sleep(1);
            }
        }
        catch(Exception e)
{
        }       
    }
    public void update(Graphics g)
{
        paint(g);
    }
       
    public void paint(Graphics g)
{               
        Dimension d = getSize();
        int x = (int)(Math.random() * d.width);
        int y = (int)(Math.random() * d.height);
g.setColor(Color.red); 
        g.fillOval(x,y,10,10);          
    }

}

Output:-
Read More »

Thursday, 2 November 2017

Best Way to Learn Java Programming Language

Top 5 tips on how to learn Java for students 

In this article, I am trying to answer most frequently asked questions. best way to learn java programming or how to learn java easily for beginners or how to learn Java fast and easy or how to learn java easily or learn java programming for beginners or Tricks to learn java quickly or Java Programming Made Easy or How do I program in Java? or How do I start programming in Java? or What are the basics of Java? or What are the OOPS concepts in Java? with complete guide.

Nowadays, at the time when computer technology is rapidly developing, programming is getting more and more popular, attracting the attention of a huge number of people. Everyone wants to become a developer with the profound knowledge of all popular programming languages. Even those without special education can begin to develop programs and build websites. The main point here is the desire and persistence to study new material as well as constant practice. This is the only recommendation on how to learn java quickly, just as any other programming language. Best way to learn java programming

learn java programming for beginners

Tips for learning java – Study options


Want to start learning java “from scratch”? There are several ways for you to master new material in this area. Private tutors will tell you how to start getting into programming and teach you the important aspects of writing a quality code. However, this method of java studying is quite costly; therefore, most people seek for cheaper alternatives, such as:

● Specialized courses – They are cheaper than the lessons of a personal tutor. It is worth noting that many employers appreciate the availability of various certificates obtained after the graduation from computer academies. We strongly advise you to pay attention to the courses of the world-famous companies like Microsoft and Cisco.

● Online courses – There are a lot of services on the Internet where you can view the lectures of professors from Oxford, Harvard, and other renowned educational institutions around the world, such as John Landrum. There are also special platforms for training practical programming skills, which we will discuss further in this post.

● Self-study – Students can start learning java even without enrolling in courses and spending lots of money. In this case, the easiest way to learn to program is self-education. It is recommended to start the process with reading the basics, without digging into the theory. Do not be lazy to start practicing right away, since it is only in the process of writing the code that you will acquire the necessary skills.

Top online platforms to learn java


If you are wondering how to learn java for beginners, we have prepared a selection of websites for studying programming regardless of who you are, how old you are, and what you are doing.

How do I program in Java

codecademy.com

It is, undoubtedly, the most famous website for studying programming. With this platform, you can begin to familiarize yourself with programming immediately from the home page. Here you can learn the programming principles and choose the course you want, whether it is Java, jQuery, PHP, Ruby, or Python. The website boasts of more than 25 million users and many positive reviews from reputable editions, which indicates the great popularity of the service.

codeschool.com

This platform provides for a more in-depth study of programming. It is recommended to start learning java with the above website and solidify knowledge with this service. A good thing to be mentioned here is that courses are free on codeschool.com, but access to some sections requires $25 per month.

Treehouse

The treehouse courses are more centered on practice compared to other platforms that simply teach the theory of a programming language. Before you start working on a certain task, for example, on creating an interactive web application, you will get all the necessary knowledge to complete the assignment. The resource will be very useful for beginners in programming and those who want to train for a new occupation.

codeavangers.com

The website is specifically targeted at those who do not have programming skills and knowledge at all. Apart from JavaScript, here you can learn HTML5 and CSS3 among a range of programming languages. Hunting for bugs, participating in the mission of robots, solving code-related problems is exciting and interesting with codeavangers.com. At the end of each lesson, you will have to pass a small game in order to prove your knowledge practically.

w3schools.com

On this website, a studying process is interactive, with tutorials and examples of different tasks. All the courses are conveniently sorted by sections; thus, you can go to the one that interests you most. After completing the course, you can get a paid certificate, which is definitely a benefit.

programr.com

It is an online multi-programming course where you can learn not only Java but also PHP, C++, Python, and other languages. The main focus is on checking the knowledge acquired through interactive exercises.

Author of This Post


John Landrum is a well-known blogger, who shares programming courses all around the world about different platforms and sources where you can learn Java and other languages. John truly believes that one of the most important essentials is to be persistent and goal-oriented in achieving your goals. You can always read his posts on https://eduzaurus.com to know how to reach your objectives easily. Know more about John Landrum Click here.


Read More »

Wednesday, 1 November 2017

Bouncing Ball Program in Java Using Applet

Problem:- Bouncing ball animation in Applet or Bouncing ball in Java or How to create a bouncing ball animation or Bouncing Ball or bouncing ball program in java using an applet.how to make a bouncing ball in java or java bouncing balls collision detection or multiple bouncing balls java or bouncing ball in java using thread or bouncing ball program in java using an applet or moving ball program in java or java bouncing ball tutorial or java ball bounce off each other.

Explanation:- Bouncing ball animation in Java using Applet, is a simple GUI(Graphical User Interface) Animation. In this animation, there are 4 Balls with different-different color(Red, Blue, Magenta, Yellow) are Bouncing Random in a square. Now Question is That how actually they are moving in a square so basically Bouncing ball animation in Applet we are using a "For Loop" and running this "For Loop" Infinite and and changing there Ovels position and some values and repaint all four balls in a new position so in this way, all four ball looks like they are moving without changing their color. We also use some Event all event are below.

mouseExited
mouseReleased
mouseEntered
mousePressed
mouseClicked

Check this first so you can run Bouncing ball animation in Applet very easy without any error and without any problem How to Run Java Applets and Swing Using Command Line.


Solution:- Bouncing Ball

import java.applet.*;
import java.awt.*;
import java.awt.event.*;
//

/* Program By Ghanendra Yadav
    Visit http://www.programmingwithbasics.com/
*/
public class BOUNCINGBALLS extends Applet implements MouseListener, Runnable
{
    Thread t=null;
    int x1=10, x2=10, x3=10, x4=10;
    int y1=300, y2=300, y3=300, y4=300;
 int flagx1,flagy1,flagx2,flagy2;
 int flagx3,flagy3,flagx4,flagy4;
    
    public void init()
     {
         addMouseListener(this);         
     }
    public void mouseExited(MouseEvent me)   {}
    public void mouseReleased(MouseEvent me) {}
    public void mouseEntered(MouseEvent me)  {}
    public void mousePressed(MouseEvent me)  {}
    public void mouseClicked(MouseEvent me)  {}
    
    public void start()
    {
        t=new Thread(this);                        
        t.start();
    }
   
    public void run()
    {
        for(;;)
        {
            try
            {
                repaint();
    if(y1<=50) 
    flagx1=0;
    else if(y1>=300) 
    flagx1=1;
    if(x1<=10) 
    flagy1=0;
    else if(x1>=400) 
    flagy1=1;
    if(y2<=50) 
    flagx2=0;
    else if(y2>=300) 
    flagx2=1;
    if(x2<=10) 
    flagy2=0;
    else if(x2>=400) 
    flagy2=1;
    if(y3<=50) 
    flagx3=0;
    else if(y3>=300) 
    flagx3=1;
    if(x3<=10) 
    flagy3=0;
    else if(x3>=400) 
    flagy3=1;
    if(y4<=50) 
    flagx4=0;
    else if(y4>=300) 
    flagx4=1;
    if(x4<=10) 
    flagy4=0;
    else if(x4>=400) 
    flagy4=1;
                Thread.sleep(10);
            }catch(InterruptedException e){}
        }
    }
    public void paint(Graphics g)
    {
  g.drawRect(10,50,410,270);
  
        g.setColor(Color.blue);
        g.fillOval(x1,y1,20,20);
  if(flagx1==1)
   y1-=2;
  else if(flagx1==0)
   y1+=2;
  if(flagy1==0)
   x1+=4;
  else if(flagy1==1)
   x1-=4; 
        g.setColor(Color.red);
        g.fillOval(x2,y2,20,20);
  if(flagx2==1)
   y2-=4;
  else if(flagx2==0)
   y2+=4;
  if(flagy2==0)
   x2+=3;
  else if(flagy2==1)
   x2-=3;
        g.setColor(Color.yellow);
        g.fillOval(x3,y3,20,20);
  if(flagx3==1)
   y3-=6;
  else if(flagx3==0)
   y3+=6;
  if(flagy3==0)
   x3+=2;
  else if(flagy3==1)
   x3-=2;
 g.setColor(Color.magenta);
        g.fillOval(x4,y4,20,20);
  if(flagx4==1)
   y4-=5;
  else if(flagx4==0)
   y4+=5;
  if(flagy4==0)
   x4+=1;
  else if(flagy4==1)
   x4-=1;
    }
}

Output:-


Bouncing Ball Program in Java Using Applet

Bouncing Ball Program in Java Using Applet

Read More »

Monday, 16 October 2017

Types of Variables in java

In this post, we will talk about java variables. Like a different type of variable how to use it?. how to access it etc?. So java is the class base language the class contains five elements.


Java Class Elements are


1.variable
2.methods
3.constructor
4.instance block
5.static block



Variables


So C/C++ language contains variable int a=10 b=20 etc. in the same way java also contains some variable part. so to work with employe project we need employee id, name, salary etc.So every project required variable concepts. So before going to the variable concept.First of all, we must know what is the purpose of the variable in java. So the variable is used to store the values by using these value we achieve the project requirements.For example, an employee project, we need employee salary, name, id etc.

So in a single line variable are used to store value and by using these value we achieve the project requirements. generally, variables are 3 types.


Types of Variable


1. local variables
2. instance variables
3. static variables


1. local variables


1. The variable which is declared inside method or constructor or blocks also. Those variables called local variables

Example:-

class 
{
public static void main(String[] args) 
{
//local variables
int a=50;
int b=20
System.out.println(a);
System.out.println(a);
}
}

2. The scope of the local variables only within the method only or within the constructor or within the blocks only. So simply can say that local variable cannot be accessed the outside the method, block, constructors. If we trying to access the local variable outside it generates the error message.

Example:-

class demo
{
public static void main(String[] args) 
{
void method()
{
int a=30;
System.out.println(a); //possible

}
void method2()
{
System.out.println(a);// not possible to print inside the method

}
}
}

3. local variable Memory Allocated when method start and the whenever the method is completed memory is released.Local variable stored in stack memory.


2. Instance variables


So before the brief of instance variables, we must know areas of java language.java contains 2 types of areas, instance area, and static area.so once we understand these 2 areas then java variables concept is very easy. So the body of instance method called instance area, and the body of the static method called the static method.

Example:-
   
class demo
{

void method()// instance method
{

//instance area

}
static void method2() //static method
{
//static area

public static void main(String[] args) 
{

}
}


1. The variable that is declared inside the class but outside the method, Those variables called instance variables.

2. The scope of the instance variable is inside the class all methods, constructor and blocks are able to access.

3. For the instance variable memory allocated when the object is created and memory is destroyed when the object is destroyed.

4. Instance variable stored in heap memory

Note:- When the same area we can access the instance variable directly. But in a different area, first of all, we must allocate memory of instance variable So how memory is allocated, linked with the object, means create an object of that class in a single line, first of all, create an object of that class. And access that class instance variable and method by using that object.

Instance var, method==========>direct access========>instance area

Instance var,method==============>throw object========>static area

Example:-

class demo
 {
//instance var
int x=20;
int y=30;
  void m()//instance method
{
 //instance area
 System.out.println(x+y);
     }

 public static void main(String[] args)//main method (static method) 
{
//static area
 demo d new demo();
 System.out.println(d.x);
 System.out.println(d.y);
 d.m();
}
}



3. Static variable


1. The variable that is declared inside the class but outside the method with a static modifier, Those variables called static variables.

Example:-

class 
{ //static  variables
static int a; 
static float b;
static char c;
}

2. Static variable memory allocated when the .class file is loading.

3. The scope of static variable is inside the class 

4. Static variable stored in non-heap memory.

Note:- access the static variable and method by using the class name. Reason static variable memory allocated when the .class file is loading. means before the main method load, static variable memory allocated.

Example:-

class demo
 {
//static var
static int x=20;
static int y=30;
  void m()//instance method
{
 //instance area
  System.out.println(demo.x);
 System.out.println(demo.y);
     }

 public static void main(String[] args)//main method (static method) 
{
//static area
 demo d = new demo();
 System.out.println(demo.x);
 System.out.println(demo.y);
 d.m();
}
Read More »