Você está na página 1de 6

Atividade 01

Arquivo: Index.php
<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title></title>

</head>

<body>

<pre>

<?php

require_once 'avaliacao.php';

$x1 = new Livros();

$x1 -> status();

print_r($x1);

?>

</pre>

</body>

</html>
Arquivo: Avaliacao.php
<?php

class Livros{

private $codigo;

private $descLivro;

private $isbn;

private $editora;

//metodos

public function status(){

$this -> getEditora();

public function __construct(){

$this -> editora = "Kroton Educacional";

//Metodos getters e setters

public function getCodigo(){

return $this -> codigo;

public function getDescLivro(){

return $this -> descLivro;


}

public function getISBN(){

return $this -> isbn;

public function getEditora(){

return $this -> editora;

public function setCodigo($c){

$this -> codigo = $c;

public function setDescLivro($d){

$this -> descLivro = $d;

public function setISBN($i){

$this -> isbn = $i;

public function setEditora($e){

$this -> editora = $e;

?>
Atividade 02
Arquivo: Index 2.php
<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title></title>

</head>

<body>

<pre>

<?php

require_once 'avaliacao2.php';

$x1 = new EventoAcademico();

$x1 -> gerarRelatorio();

print_r($x1);

?>

</pre>

</body>

</html>
Arquivo: Avaliacao2.php
<?php

class EventoAcademico{

public $nomeDoEvento;

public $localDoEvento;

public $numeroDeParticipantes;

//metodos

public function gerarRelatorio(){

print_r("Evento: ");

public function __construct(){

$this -> nomeDoEvento = "Festa Setembrina FP";

$this -> localDoEvento = "Linhares";

$this -> numeroDeParticipantes = 1000;

?>

Você também pode gostar