package com.myapp;

import java.io.Serializable;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

@ManagedBean
@SessionScoped
public class Sqrt implements Serializable{

//    @PersistenceContext
 //   private EntityManager em;
	
	
	
    public Sqrt() {
    }

    double number;//入力値
    double result;//平方根

    public double getNumber() {
        return number;
    }

    public void setNumber(double number) {
        this.number = number;
    }

    public double getResult() {
//        em.find(Employee.class, 10);
        return Math.sqrt(number);
    }
    
}
