├── trabalho-app_android ├── settings.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── .gitignore ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ ├── values │ │ │ │ │ ├── colors.xml │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── layout-pt │ │ │ │ │ └── localizacao.xml │ │ │ │ └── layout │ │ │ │ │ ├── activity_cinemark.xml │ │ │ │ │ ├── activity_cinespaco.xml │ │ │ │ │ ├── activity_cinesystem.xml │ │ │ │ │ ├── favoritos.xml │ │ │ │ │ ├── cinema.xml │ │ │ │ │ └── activity_main.xml │ │ │ ├── cpp │ │ │ │ └── native-lib.cpp │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── william │ │ │ │ │ └── trabalho │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ ├── Cinema.java │ │ │ │ │ ├── Cinemark.java │ │ │ │ │ ├── Cinesystem.java │ │ │ │ │ ├── Cinespaco.java │ │ │ │ │ └── Filme.java │ │ │ └── AndroidManifest.xml │ │ ├── test │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── william │ │ │ │ └── trabalho │ │ │ │ └── ExampleUnitTest.java │ │ ├── androidTest │ │ │ └── java │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── william │ │ │ │ └── trabalho │ │ │ │ └── ExampleInstrumentedTest.java │ │ ├── release │ │ │ └── res │ │ │ │ └── values │ │ │ │ └── google_maps_api.xml │ │ └── debug │ │ │ └── res │ │ │ └── values │ │ │ └── google_maps_api.xml │ ├── proguard-rules.pro │ ├── build.gradle │ └── CMakeLists.txt ├── build.gradle ├── gradle.properties ├── gradlew.bat └── gradlew ├── serialization ├── arquivoDeTexto.txt └── src │ ├── salvandoEmArquivoDeTexto │ └── Main.java │ ├── serializacao │ ├── Personagem.java │ └── SerializadorEDesserializador.java │ └── SalvandoEmArquivoDeTexto │ └── TextFile.java ├── imagens ├── config_jboss.png ├── configs_jboss.png └── intelijj_add_config.png ├── gui ├── DesenhoSimples.java ├── ExibeCaixaDialago.java ├── DesenhoSimplesPreenchido.java ├── DesenhoSimplesPreenchidoTest.java ├── DesenhoSimplesTest.java ├── RetanguloEOvaisTest.java └── RetanguloEOvais.java ├── handle_exceptions ├── TryCatch.java └── TryCatchFinally.java ├── .gitignore ├── application_server └── README.md ├── LICENSE └── README.md /trabalho-app_android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /serialization/arquivoDeTexto.txt: -------------------------------------------------------------------------------- 1 | primeira linha 2 | segunda linha -------------------------------------------------------------------------------- /imagens/config_jboss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunocampos01/desenvolvimento-de-sistemas/HEAD/imagens/config_jboss.png -------------------------------------------------------------------------------- /imagens/configs_jboss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunocampos01/desenvolvimento-de-sistemas/HEAD/imagens/configs_jboss.png -------------------------------------------------------------------------------- /imagens/intelijj_add_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunocampos01/desenvolvimento-de-sistemas/HEAD/imagens/intelijj_add_config.png -------------------------------------------------------------------------------- /trabalho-app_android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunocampos01/desenvolvimento-de-sistemas/HEAD/trabalho-app_android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /trabalho-app_android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .gradle 3 | /local.properties 4 | /.idea/workspace.xml 5 | /.idea/libraries 6 | .DS_Store 7 | /build 8 | /captures 9 | .externalNativeBuild 10 | -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunocampos01/desenvolvimento-de-sistemas/HEAD/trabalho-app_android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunocampos01/desenvolvimento-de-sistemas/HEAD/trabalho-app_android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunocampos01/desenvolvimento-de-sistemas/HEAD/trabalho-app_android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunocampos01/desenvolvimento-de-sistemas/HEAD/trabalho-app_android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunocampos01/desenvolvimento-de-sistemas/HEAD/trabalho-app_android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunocampos01/desenvolvimento-de-sistemas/HEAD/trabalho-app_android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunocampos01/desenvolvimento-de-sistemas/HEAD/trabalho-app_android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunocampos01/desenvolvimento-de-sistemas/HEAD/trabalho-app_android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunocampos01/desenvolvimento-de-sistemas/HEAD/trabalho-app_android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/brunocampos01/desenvolvimento-de-sistemas/HEAD/trabalho-app_android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /trabalho-app_android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Jun 14 01:02:35 BRT 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip 7 | -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Trabalho 3 | Map 4 | Map 5 | Map 6 | 7 | -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/layout-pt/localizacao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /serialization/src/salvandoEmArquivoDeTexto/Main.java: -------------------------------------------------------------------------------- 1 | package salvandoEmArquivoDeTexto; 2 | 3 | public class Main { 4 | public static void main(String[] args) { 5 | TextFile escreveNoAquivo = new TextFile(); 6 | 7 | escreveNoAquivo.writeFile(); 8 | escreveNoAquivo.readFile(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/cpp/native-lib.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | extern "C" 5 | JNIEXPORT jstring JNICALL 6 | Java_com_example_william_trabalho_MainActivity_stringFromJNI( 7 | JNIEnv* env, 8 | jobject /* this */) { 9 | std::string hello = "Hello from C++"; 10 | return env->NewStringUTF(hello.c_str()); 11 | } 12 | -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /gui/DesenhoSimples.java: -------------------------------------------------------------------------------- 1 | import java.awt.Graphics; 2 | import javax.swing.JPanel; 3 | 4 | public class DesenhoSimples extends JPanel{ 5 | //método que desenha o painel 6 | public void paintComponent( Graphics g) { 7 | super.paintComponent(g); 8 | 9 | int width = getWidth(); 10 | int height = getHeight(); 11 | 12 | //faz o desenho 13 | g.drawLine(0, 0, width, height); 14 | g.drawLine(0, height, width, 0); 15 | g.drawLine(width/2, 0,width/2, height); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /gui/ExibeCaixaDialago.java: -------------------------------------------------------------------------------- 1 | import javax.swing.JOptionPane; 2 | 3 | 4 | public class ExibeCaixaDialago { 5 | public static void main (String args []){ 6 | 7 | //crio e armazeno a variavel name 8 | String name = JOptionPane.showInputDialog("Nome ?"); 9 | 10 | //cria a menssagem 11 | String menssagem = String.format(" Welcome, %s dark force side !", name); 12 | 13 | //exibe a menssagem 14 | JOptionPane.showMessageDialog(null, menssagem); 15 | } 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/layout/activity_cinemark.xml: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/layout/activity_cinespaco.xml: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/layout/activity_cinesystem.xml: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /gui/DesenhoSimplesPreenchido.java: -------------------------------------------------------------------------------- 1 | import javax.swing.JPanel; 2 | import java.awt.Graphics; 3 | import java.awt.Color; 4 | 5 | public class DesenhoSimplesPreenchido extends JPanel { 6 | public void paintComponent(Graphics g){ 7 | super.paintComponent(g); 8 | 9 | //desenha o rosto 10 | g.setColor(Color.RED); 11 | g.fillOval(10, 10, 200, 200); 12 | 13 | //desenha os olhos 14 | g.setColor(Color.BLACK); 15 | g.fillOval(55, 65, 30, 30); 16 | g.fillOval(135, 65, 30, 30); 17 | 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /trabalho-app_android/app/src/test/java/com/example/william/trabalho/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package com.example.william.trabalho; 2 | 3 | import org.junit.Test; 4 | 5 | /** 6 | * Example local unit test, which will execute on the development machine (host). 7 | * 8 | * @see Testing documentation 9 | */ 10 | public class ExampleUnitTest { 11 | @Test 12 | public void additionIsCorrect() throws Exception { 13 | assertEquals(4, 2 + 2); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /handle_exceptions/TryCatch.java: -------------------------------------------------------------------------------- 1 | public class TryCatch { 2 | public static void main(String[] args) { 3 | 4 | try{ 5 | int[] vetor = new int[4]; 6 | System.out.println("antes da exception"); 7 | 8 | vetor[5] = 10; 9 | System.out.println("esse texto nao sera impresso"); 10 | 11 | }catch(ArrayIndexOutOfBoundsException exception){ 12 | System.out.println("erro de acesso ao array (posicao invalida)"); 13 | } 14 | System.out.println("linha executada depois da exception (o programa nao parou !)"); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /gui/DesenhoSimplesPreenchidoTest.java: -------------------------------------------------------------------------------- 1 | import javax.swing.JFrame; 2 | 3 | public class DesenhoSimplesPreenchidoTest { 4 | public static void main(String[] args) { 5 | DesenhoSimplesPreenchido painelDeDesenho = new DesenhoSimplesPreenchido(); 6 | JFrame frame = new JFrame(); 7 | 8 | //visible 9 | frame.setVisible(true); 10 | 11 | //close 12 | frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 13 | 14 | //size 15 | frame.setSize(230, 250); 16 | 17 | //add o painel no frame 18 | frame.add(painelDeDesenho); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /gui/DesenhoSimplesTest.java: -------------------------------------------------------------------------------- 1 | import javax.swing.JFrame; 2 | 3 | public class DesenhoSimplesTest { 4 | public static void main(String[] args) { 5 | 6 | //chama a classe que conte o desenho 7 | DesenhoSimples painel = new DesenhoSimples(); 8 | 9 | JFrame aplicacao = new JFrame(); 10 | 11 | //confgura o frame para ser fechado 12 | aplicacao.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 13 | 14 | //configura o frame visivel 15 | aplicacao.setVisible(true); 16 | 17 | aplicacao.add(painel); 18 | aplicacao.setSize(250,250); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /handle_exceptions/TryCatchFinally.java: -------------------------------------------------------------------------------- 1 | // The finally statement lets you execute code, 2 | // after try...catch, regardless of the result: 3 | 4 | public class TryCatchFinally { 5 | public static void main(String[] args) { 6 | 7 | try { 8 | int[] myNumbers = {1, 2, 3}; 9 | System.out.println(myNumbers[10]); 10 | 11 | } catch (Exception e) { 12 | System.out.println("Something went wrong."); 13 | 14 | } finally { 15 | // every time it runs 16 | System.out.println("The 'try catch' is finished."); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /trabalho-app_android/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:2.3.3' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | jcenter() 18 | } 19 | } 20 | 21 | task clean(type: Delete) { 22 | delete rootProject.buildDir 23 | } 24 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Log file 2 | *.log 3 | 4 | # BlueJ files 5 | *.ctxt 6 | 7 | # Mobile Tools for Java (J2ME) 8 | .mtj.tmp/ 9 | 10 | # Package Files # 11 | *.jar 12 | *.war 13 | *.nar 14 | *.ear 15 | *.zip 16 | *.tar.gz 17 | *.rar 18 | 19 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 20 | hs_err_pid* 21 | 22 | # Java 23 | *.class 24 | *.jar 25 | *.war 26 | *.ear 27 | 28 | # Eclipse 29 | .project 30 | .classpath 31 | .settings 32 | 33 | # Idea 34 | .idea 35 | *.iml 36 | *.iws 37 | *.ipr 38 | 39 | # OS 40 | Thumbs.db 41 | .DS_Store 42 | 43 | # Gradle 44 | .gradle 45 | !gradle-wrapper.jar 46 | 47 | # Maven 48 | target 49 | 50 | # Build 51 | out 52 | build 53 | bin/* 54 | 55 | # IDEs and editors 56 | .vscode/* 57 | .idea/* -------------------------------------------------------------------------------- /trabalho-app_android/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /gui/RetanguloEOvaisTest.java: -------------------------------------------------------------------------------- 1 | import javax.swing.JFrame; 2 | import javax.swing.JOptionPane; 3 | 4 | public class RetanguloEOvaisTest { 5 | 6 | public static void main(String[] args) { 7 | 8 | String input = JOptionPane.showInputDialog(null, "1 = retangulo\n" + "2 = oval\n" 9 | + "3 = circulos concntricos\n" + "4 = espiral quadrada"); 10 | int choise = Integer.parseInt(input); 11 | 12 | //objeto que contem o desenho (painel) 13 | RetanguloEOvais painel = new RetanguloEOvais(choise); 14 | 15 | //objeto frame que recebe o painel 16 | JFrame frame = new JFrame(); 17 | 18 | //visible 19 | frame.setVisible(true); 20 | 21 | //CLOSE_ON_DESCRITPION 22 | frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 23 | 24 | //Size 25 | frame.setSize(400,400); 26 | 27 | //O objeto frame recebe o objeto painel 28 | frame.add(painel); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /trabalho-app_android/app/src/androidTest/java/com/example/william/trabalho/ExampleInstrumentedTest.java: -------------------------------------------------------------------------------- 1 | package com.example.william.trabalho; 2 | 3 | import android.content.Context; 4 | import android.support.test.InstrumentationRegistry; 5 | import android.support.test.runner.AndroidJUnit4; 6 | 7 | import org.junit.Test; 8 | import org.junit.runner.RunWith; 9 | 10 | 11 | /** 12 | * Instrumentation test, which will execute on an Android device. 13 | * 14 | * @see Testing documentation 15 | */ 16 | @RunWith(AndroidJUnit4.class) 17 | public class ExampleInstrumentedTest { 18 | @Test 19 | public void useAppContext() throws Exception { 20 | // Context of the app under test. 21 | Context appContext = InstrumentationRegistry.getTargetContext(); 22 | 23 | assertEquals("com.example.william.trabalho", appContext.getPackageName()); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/layout/favoritos.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 14 | 15 | 23 | -------------------------------------------------------------------------------- /application_server/README.md: -------------------------------------------------------------------------------- 1 | # Criação de um Servidor de Aplicação 2 | 3 | 1. Faça o download da versão Java EE no WildFly 4 | ```bash 5 | wget https://download.jboss.org/wildfly/17.0.1.Final/wildfly-17.0.1.Final.zip 6 | ``` 7 | 8 | 2. Descompacte 9 | ```bash 10 | unzip wildfly-17.0.1.Final.zip 11 | ``` 12 | 13 | 3. Clique em `Add Configuration` 14 | 15 | 16 | 17 | 18 | 4. Clique no menu esquerdo em `JBoss Server > Unnamed` 19 | 20 | 21 | 22 | 23 | 5. Selecione o servidor 24 | 25 | 26 | 27 | 28 | 6. Renomei a aplicação, selecione a versão do java, na aba deplyment, selecione o war (artefato) e por fim clique em apply e ok. 29 | 30 | 31 | -------------------------------------------------------------------------------- /trabalho-app_android/app/src/release/res/values/google_maps_api.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 20 | YOUR_KEY_HERE 21 | 22 | 23 | -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/java/com/example/william/trabalho/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.william.trabalho; 2 | 3 | import android.os.Bundle; 4 | import android.support.v7.app.AppCompatActivity; 5 | import android.widget.TextView; 6 | 7 | public class MainActivity extends AppCompatActivity { 8 | 9 | @Override 10 | protected void onCreate(Bundle savedInstanceState) { 11 | super.onCreate(savedInstanceState); 12 | setContentView(R.layout.activity_main); 13 | 14 | // Example of a call to a native method 15 | TextView tv = (TextView) findViewById(R.id.sample_text); 16 | tv.setText(stringFromJNI()); 17 | } 18 | 19 | /** 20 | * A native method that is implemented by the 'native-lib' native library, 21 | * which is packaged with this application. 22 | */ 23 | public native String stringFromJNI(); 24 | 25 | // Used to load the 'native-lib' library on application startup. 26 | static { 27 | System.loadLibrary("native-lib"); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /trabalho-app_android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /home/william/Android/Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | 19 | # Uncomment this to preserve the line number information for 20 | # debugging stack traces. 21 | #-keepattributes SourceFile,LineNumberTable 22 | 23 | # If you keep the line number information, uncomment this to 24 | # hide the original source file name. 25 | #-renamesourcefileattribute SourceFile 26 | -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/layout/cinema.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Bruno Campos 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /serialization/src/serializacao/Personagem.java: -------------------------------------------------------------------------------- 1 | package serializacao; 2 | 3 | import java.io.Serializable; 4 | 5 | public class Personagem implements Serializable 6 | { 7 | private int account; 8 | private String firstName; 9 | private String lastName; 10 | private double balance; 11 | 12 | // set 13 | public void setAccount( int acct ) 14 | { 15 | account = acct; 16 | } 17 | 18 | // get 19 | public int getAccount() 20 | { 21 | return account; 22 | } 23 | 24 | // set 25 | public void setFirstName( String first ) 26 | { 27 | firstName = first; 28 | } 29 | 30 | // get 31 | public String getFirstName() 32 | { 33 | return firstName; 34 | } 35 | 36 | // set 37 | public void setLastName( String last ) 38 | { 39 | lastName = last; 40 | } 41 | 42 | // get 43 | public String getLastName() 44 | { 45 | return lastName; 46 | } 47 | 48 | // set 49 | public void setBalance( double bal ) 50 | { 51 | balance = bal; 52 | } 53 | 54 | // get 55 | public double getBalance() 56 | { 57 | return balance; 58 | } 59 | } -------------------------------------------------------------------------------- /trabalho-app_android/app/src/debug/res/values/google_maps_api.xml: -------------------------------------------------------------------------------- 1 | 2 | 23 | 24 | YOUR_KEY_HERE 25 | 26 | 27 | -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/java/com/example/william/trabalho/Cinema.java: -------------------------------------------------------------------------------- 1 | package com.example.william.trabalho; 2 | 3 | 4 | public class Cinema { 5 | 6 | private String nome; 7 | private String localizacao; 8 | 9 | public static Cinema createCinema(){ 10 | Cinema cinema = new Cinema(); 11 | cinema.setLocalizacao("Iguatemi"); 12 | cinema.setNome("Cinesystem"); 13 | 14 | return cinema; 15 | } 16 | 17 | public static Cinema createCinema2(){ 18 | Cinema cinema = new Cinema(); 19 | cinema.setLocalizacao("Floripa Shopping"); 20 | cinema.setNome("Cinemark"); 21 | return cinema; 22 | } 23 | 24 | public static Cinema createCinema3(){ 25 | Cinema cinema = new Cinema(); 26 | cinema.setLocalizacao("Beira Mar"); 27 | cinema.setNome("Cinespaço"); 28 | return cinema; 29 | } 30 | 31 | 32 | 33 | public String getNome() { 34 | return nome; 35 | } 36 | 37 | public void setNome(String nome) { 38 | this.nome = nome; 39 | } 40 | 41 | public String getLocalizacao() { 42 | return localizacao; 43 | } 44 | 45 | public void setLocalizacao(String localizacao) { 46 | this.localizacao = localizacao; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /gui/RetanguloEOvais.java: -------------------------------------------------------------------------------- 1 | import javax.swing.JPanel; 2 | import java.awt.Graphics; 3 | 4 | public class RetanguloEOvais extends JPanel{ 5 | 6 | private int choice; 7 | 8 | //construtor 9 | public RetanguloEOvais (int escolha){ 10 | this.choice = escolha; 11 | } 12 | 13 | //método obrigatório para exibir o painel 14 | public void paintComponent (Graphics g){ 15 | super.paintComponent(g); 16 | 17 | int height = getHeight(); 18 | int width = getWidth(); 19 | 20 | for(int i = 0; i < 15; i++){ 21 | switch (choice){ 22 | case 1: 23 | g.drawRect(10 + i*10, 10 + i*10, 50 + i *10, 50 + i *10); 24 | break; 25 | 26 | case 2 : 27 | g.drawOval(10 + i*10, 10+ i*10, 50 + i *10, 50 + i *10); 28 | break; 29 | 30 | case 3 : 31 | g.drawOval(width/2-10*i, height/2-10*i, 20*i, 20*i); 32 | break; 33 | 34 | case 4: 35 | g.drawLine(width/2+10*i, height/2-10*i, width/2+10*i, height/2+10*(i+1)); 36 | g.drawLine(width/2+10*i, height/2+10*(i+1), width/2-10*(i+1), height/2+10*(i+1)); 37 | g.drawLine(width/2-10*(i+1), height/2+10*(i+1), width/2-10*(i+1), height/2-10*(i+1)); 38 | g.drawLine(width/2-10*(i+1), height/2-10*(i+1), width/2+10*(i+1), height/2-10*(i+1)); 39 | 40 | default: 41 | break; 42 | 43 | } 44 | } 45 | 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /trabalho-app_android/app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "26.0.0" 6 | defaultConfig { 7 | applicationId "com.example.william.trabalho" 8 | minSdkVersion 16 9 | targetSdkVersion 25 10 | versionCode 1 11 | versionName "1.0" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | externalNativeBuild { 14 | cmake { 15 | cppFlags "-frtti -fexceptions" 16 | } 17 | } 18 | } 19 | buildTypes { 20 | release { 21 | minifyEnabled false 22 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 23 | } 24 | } 25 | externalNativeBuild { 26 | cmake { 27 | path "CMakeLists.txt" 28 | } 29 | } 30 | } 31 | 32 | dependencies { 33 | compile fileTree(dir: 'libs', include: ['*.jar']) 34 | androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 35 | exclude group: 'com.android.support', module: 'support-annotations' 36 | }) 37 | compile 'com.android.support:appcompat-v7:25.3.1' 38 | compile 'com.android.support.constraint:constraint-layout:1.0.2' 39 | compile 'com.google.android.gms:play-services-maps:11.0.0' 40 | testCompile 'junit:junit:4.12' 41 | } 42 | -------------------------------------------------------------------------------- /trabalho-app_android/app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 19 | 20 |