/*
Copyright (C) 2013 Alessandro Bugatti (alessandro.bugatti@istruzione.it)
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
/*! \file
* \brief
* \author Alessandro Bugatti
* \version 0.1
* \date Creazione 1-nov-2014
* \date Ultima modifica 1-nov-2014
*/
package blocconotetest;
public class Appunto {
private String testo;
private int importanza;
public Appunto(String t, int i)
{
testo = t;
if (i < 0 || i > 5) i = 1;
importanza = i;
}
public Appunto(Appunto a)
{
testo = a.testo;
importanza = a.importanza;
}
public int getImportanza()
{
return importanza;
}
@Override
public String toString()
{
String r = "";
if (importanza == 1) r = "Per nulla importante : ";
if (importanza == 2) r = "Poco importante : ";
if (importanza == 3) r = "Importante : ";
if (importanza == 4) r = "Molto importante : ";
if (importanza == 5) r = "Importantissimo : ";
return r + testo;
}
}