CSCE A201 Computer Programming I Lab 0

Total Page:16

File Type:pdf, Size:1020Kb

CSCE A201 Computer Programming I Lab 0 CSCE A201 Computer Programming I Lab 0 Lecture Instructors: Dr. Kenrick Mock, MW 11:30‐12:45pm Dr. Frank Witmer, TR 10‐11:15am Lab Assistants: Deanna Flynn Elisha Waugh Goals for Today • Introduce lab assistants • Meet some of your classmates • Introduction to Dr. Java • Understand platform independence • Write your first (!?) Java program Syllabus Highlights wrt. Lab • May students collaborate on lab assignments? • May students collaborate on programming assignments? • What percentage of the total course grade is determined by lab? • How is the lab grade determined? Introduce your Neighbor 1. Name 2. Hometown 3. Something interesting (e.g. hobby or recent trip) Some Java Development Environments • Dr. Java – from Rice University, simple & effective – standalone executable (installation instructions on Blackboard) • jGRASP – NSF funded at Auburn University • Intellij IDEA – good code completion & error messages – https://www.jetbrains.com/idea/ • NetBeans – from Oracle, good for multiple, larger projects • Eclipse – more plug‐ins, more customizable – good for Android development) • TextPad (initially free, but then ~$30) • Any text editor & command line – Notepad++ with Cygwin/DOS – emacs, vim, nano with unix/linux • See also Appendix 1 in Savitch book Java Example • Class Hello must be stored in file Hello.java public class Hello { public static void main(String[] args) { System.out.println("Hello world."); } } Platform Independence Demo • Compile java & C++ programs on linux – Which executable/bytecode will run on a Windows machine? Platform Independence • Use ‘javac’ command to compile Java source code .java files high‐level language • Use ‘java’ command to run Java bytecode .class and .jar (Java Archive) files low‐level language Same bytecodes can run any platform with an appropriate JVM (‘java’) Lab 0 Exercise 1. Start Dr. Java from the Start menu – For your personal computer, you can download it from www.drjava.org 2. Write a program that prints your name to the console – What elements must it contain? 3. Save your class as a .java file – Dr. Java makes backup copies of your file with suffix .java~ • Ignore these (don’t submit them to Blackboard) 4. Archive your work by using Google Drive (with your UAA email account) or a thumb drive.
Recommended publications
  • Universidade Salvador – Unifacs Programa De Pós-Graduação Em Redes De Computadores Mestrado Profissional Em Redes De Computadores
    UNIVERSIDADE SALVADOR – UNIFACS PROGRAMA DE PÓS-GRADUAÇÃO EM REDES DE COMPUTADORES MESTRADO PROFISSIONAL EM REDES DE COMPUTADORES DEMIAN LESSA INTERFACES GRÁFICAS COM O USUÁRIO: UMA ABORDAGEM BASEADA EM PADRÕES Salvador 2005 DEMIAN LESSA INTERFACES GRÁFICAS COM O USUÁRIO: UMA ABORDAGEM BASEADA EM PADRÕES Dissertação apresentada ao Mestrado Profissional em Redes de Computadores da Universidade Salvador – UNIFACS, como requisito parcial para obtenção do grau de Mestre. Orientador: Prof. Dr. Manoel Gomes de Mendonça. Salvador 2005 Lessa, Demian Interfaces gráficas com o usuário: uma abordagem baseada em padrões / Demian Lessa. – Salvador, 2005. 202 f.: il. Dissertação apresentada ao Mestrado Profissional em Redes de Computadores da Universidade Salvador – UNIFACS, como requisito parcial para a obtenção do grau de Mestre. Orientador: Prof. Dr. Manoel Gomes de Mendonça. 1. Interfaces gráficas para usuário - Sistema de computador. I. Mendonça, Manoel Gomes de, orient. II. Título. TERMO DE APROVAÇÃO DEMIAN LESSA INTERFACES GRÁFICAS COM O USUÁRIO: UMA ABORDAGEM BASEADA EM PADRÕES Dissertação aprovada como requisito parcial para obtenção do grau de Mestre em em Redes de Computadores da Universidade Salvador – UNIFACS, pela seguinte banca examinadora: Manoel Gomes de Mendonça – Orientador _________________________________ Doutor em Ciência da Computação pela Universidade de Maryland em College Park, Estados Unidos Universidade Salvador - UNIFACS Celso Alberto Saibel Santos ____________________________________________ Doutor em Informatique Fondamentalle et Parallelisme pelo Université Paul Sabatier de Toulouse III, França Universidade Federal da Bahia – UFBA Flávio Morais de Assis Silva _____________________________________________ Doutor em Informática pelo Technische Universität Berlin, Alemanha Universidade Federal da Bahia – UFBA Salvador de de 2005 A meus pais, Luiz e Ines, pelo constante incentivo intelectual e, muito especialmente, por todo amor e carinho repetidamente demonstrados.
    [Show full text]
  • Towards Actionable Visualisation in Software Development
    Towards Actionable Visualisation in Software Development Leonel Merino, Mohammad Ghafari, and Oscar Nierstrasz Software Composition Group, University of Bern Bern, Switzerland {merino, ghafari, oscar}@inf.unibe.ch Abstract—Although abundant studies have shown how visual- are still unaware of existing visualisation techniques to isation can help software developers to perform their daily tasks, adopt for their particular needs. A few studies have tried to visualisation is still not a common practice since developers address this issue by investigating to which software engi- have little support for adopting a proper visualisation for their needs. neering tasks particular visualisation techniques have been In this paper we review the 346 papers published in SOFT- applied [13]–[15]. Nevertheless, we believe these studies are VIS/VISSOFT venues and identify 65 design study papers that still coarse-grained to match a suitable visualisation to their describe how visualisation is used to alleviate various difficulties concrete needs. in software development. We classify these studies into several When developers perform a particular programming task problem domains that we collected from the research on soft- ware development community, and highlight the characteristics they ask some questions such as “what code is related to a of each study. On the one hand, we support software developers change?” or “where is this method called?”. Several studies to put visualisation in action by mapping existing techniques have investigated such questions and classified them into to particular needs in various problem domains. On the other groups [16]–[18]. Indeed, such questions reflect developer hand, we help researchers in the field by exposing domains with needs, and we believe mapping them to existing types of little visualisation support.
    [Show full text]
  • Java Ide's One-On-One*
    DR. J VS. THE BIRD: JAVA IDE'S ONE-ON-ONE* Michael Olan Computer Science and Information Systems Richard Stockton College Pomona, NJ 08240 609-652-4587 [email protected] ABSTRACT An important decision facing instructors of introductory programming courses is the choice of supporting software development tools. Usually this involves selecting an integrated development environment (IDE). BlueJ has received widespread adoption for first year courses that use the Java programming language; however, DrJava is emerging as an alternative. This paper features a comparison of the pedagogical approaches used by BlueJ and DrJava as a guideline for selecting the tool best suited to the teaching style used in the introductory course. 1. INTRODUCTION The choice was simple when text editors and the command line were the only tools for developing programs. That changed with the introduction of integrated development environments (IDE's), and campuses nationwide adopted Borland's Turbo Pascal. Languages also have changed. Pascal was designed as a teaching language, but now academic programs use advanced languages designed for professional software engineers. Making these complex languages accessible to beginning students requires a careful selection of the development environment. This discussion will only include Java, currently the dominant language choice for introductory courses. Let us first consider several levels of tool support in the introductory course sequence: 1) Minimal: A text editor and the command line. 2) Simple IDE: Just the basics, no bells and whistles. 3) Professional IDE: Powerful and feature filled. ___________________________________________ * Copyright © 2004 by the Consortium for Computing Sciences in Colleges. Permission to copy without fee all or part of this material is granted provided that the copies are not made or distributed for direct commercial advantage, the CCSC copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Consortium for Computing Sciences in Colleges.
    [Show full text]
  • The Impact of Different Teaching Approaches and Languages On
    The Impact of Different Teaching Approaches and Languages on Student Learning of Introductory Programming Concepts A Thesis Submitted to the Faculty of Drexel University by Wanda M. Kunkle in partial fulfillment of the requirements for the degree of Doctor of Philosophy September 2010 Copyright 2010 Wanda M. Kunkle. All Rights Reserved. ii DEDICATIONS I dedicate this dissertation to the memory of Nathan J. Kunkle the loving father who encouraged me to become the person I was meant to be and the highly respected educator who inspired me to follow in his footsteps. Nathan J. Kunkle (1907 – 1965) iii ACKNOWLEDGEMENTS I wish to thank my advisor, Robert Allen, and the members of my dissertation committee for their support and guidance in doing the research and writing required to complete this work. I also wish to thank the Computer Science instructors who helped me recruit the students who participated in my research study, as well as the students themselves. Without the students, there would have been no study. I especially wish to thank the friends and family who encouraged me to keep going when I began to falter because I was feeling overwhelmed by the amount of time and effort I needed to put in to complete this dissertation. Some of those friends are on my dissertation committee, so they are getting thanked twice. Finally, a special thanks goes out to my cousin, Durand Kunkle, who regularly called to ask how I was progressing with my dissertation. He has been planning the celebration for some time now. iv TABLE OF CONTENTS LIST OF FIGURES
    [Show full text]
  • Overview of Jgrasp and the Tutorials
    Overview (v1.8) 8/9/2005 Overview of jGRASP and the Tutorials jGRASP is a lightweight integrated development environment IDE), created specifically to provide visualizations for improving the comprehensibility of software. jGRASP is implemented in Java, and thus, runs on all platforms with a Java Virtual Machine. As with the previous versions, jGRASP supports Java, C, C++, Ada, and VHDL, and it comes configured to work with several popular compilers to provide “point and click” compile and run. jGRASP, which is based on its predecessors, pcGRASP and UNIX GRASP (written in C/C++), is the latest IDE from the GRASP (Graphical Representations of Algorithms, Structures, and Processes) research group at Auburn University. jGRASP currently provides for the automatic generation of three important software visualizations: (1) Control Structure Diagrams (Java, C, C++, Ada, and VHDL) for source code visualization, (2) UML Class Diagrams (Java) for architectural visualization, and (3) Data Structure Diagrams (Java). jGRASP also provides an innovative Object Workbench and Debugger which are tightly integrated with these visualizations. Each is briefly described below. The Control Structure Diagram (CSD) is an algorithmic level diagram generated for Ada, C, C++, Java and VHDL. The CSD is intended to improve the comprehensibility of source code by clearly depicting control constructs, control paths, and the overall structure of each program unit. The CSD, designed to fit into the space that is normally taken by indentation in source code, is an alternative to flow charts and other graphical representations of algorithms. The goal was to create an intuitive and compact graphical notation that is easy to use.
    [Show full text]
  • Introduction to Algorithms in Java
    Algorithms in Java: Shuffling and Random Numbers Algorithms Introduction Itʹs impossible to study programming – or even talk in depth about it – without talking about algorithms. Theyʹre an essential part of programming. Fortunately, all of us – programmers and non‐programmers alike – have experience with algorithms. Every time you give someone driving directions; every time you use a recipe to cook; every time you follow instructions for using a piece of software – all of these activities (and countless others) involve algorithms. So what is an algorithm? Simply put, an algorithm is a set of instructions, intended to solve a specific problem or accomplish a specific, finite goal, in a direct fashion. What Makes an Effective Algorithm? In general, ambiguity doesnʹt make for a good algorithm; this is particularly true in programming, because computers are mostly incapable of knowing what we want them to do, unless we spell it out precisely. So the algorithms we use should also be precise – even before we translate them into a programming language. An effective algorithm usually has the following characteristics: • Clear conditions of application: What task is the algorithm intended to accomplish, and what are the requirements for us to be able to use it? • Initialization steps & starting conditions: What do we do to prepare our data for the algorithm? How can we tell if weʹre ready to proceed? • Explicit stopping conditions and states: How do we know when weʹre done? How do we know whether we met the desired goal? • Unambiguous steps that lead from the starting conditions to the stopping conditions. Note that “unambiguous” is a subjective term.
    [Show full text]
  • Minjoo Bun Technical Skills
    MinJoo Bun 126 E. Columbia Ave. Apt 8 Palisades Park, NJ, 07650 Email: [email protected] Cell: 1-201-403-4672 Technical Skills: Programing Languages: C, C++, C#, Java, and Python, JQuery Web Development: HTML, CSS, JavaScript, and PHP Game Development: Unity IDE: jGRASP, Eclipse, and Visual Studio, phpStorm OS: Linux, macOS, and Windows Database: MySQL and Oracle Platform: Heroku, Github, Unity Other: Microsoft Office 360 Education: New Jersey Institute of Technology – also known as “NJIT” Attendance: Fall 2014 to current Expected graduation: Spring 2020 Major: Information Technology (IT) Work Experience: Verizon Wireless 2017 March - 2017 October 225 Broad Ave Suite 110, Palisades Park, NJ 07650 Mon-Sat: 9:30 AM - 8:00 PM (201) 815-1234 Dentist Assistant Align Dental Care 321 Broad Ave Bdg F5 Ridgefield, NJ 07657 Tue, Thu: 10:00 AM - 7:00 PM/Sat 10:00 AM - 4:00 PM Bakery/Café Employee 2014 September - 2017 March BB Bakery: 354 Broad Ave, Leonia, NJ 07605 Open: 6:30 AM - 10:00 PM (201) 944-1230 Online Shopping Mall Manager 2018 May - 2018 October Argus Global LLC 35 Prospect St. Palisades Park NJ 07650 10:00am - 8:00pm Turtle and Hughes Summer Internship – 2019 1900 Lower Rd. Linden NJ 07036s 10:00am – 5:00pm Ellim USA LLC August 2019 – Now 460 Bergen Blvd. Suite 380 Palisades Park NJ 0760 9:00am – 4:00pm School Projects: Unity Game – Fall 2017 Goal of the game is to have protagonist to dodge the antagonists in the map and get to the end zone with safety Using C#, an object-oriented language, multiple classes were used to enable a functional gameplay Different data structures such as arrays and lists have been incorporated into the game Sometimes a type had to be converted to another – example: int to double Website Development – Summer – 2019 Used php program such as Phpstorm to create a website that allows user to login to the website and using the website it will such for database to show questions that was previously asked for you want to ask.
    [Show full text]
  • Integrated Development Environments
    Integrated Development Environments Steven J Zeil February 13, 2013 Contents 1 The Components of an IDE 2 2 IDE Examples 3 3 Eclipse 5 1 Integrated Development Environments IDEs Integrated Develop Environments (IDEs) are software packages that attempt to provide comprehen- sive support for programming • and possible other software development activities .................................... 1 The Components of an IDE The Components of an IDE (minimal) What’s the minimum that we expect in an IDE? • editor • build – maybe no more than compiler invocation – with error messages captured/interpreted/walked by editor • run/execute • debugger .................................... The Components of an IDE (optional) What would we like to see in an IDE? • syntax highlighting & aid in editor • documentation (API) look-up • flexible/configurable build • packaging/deployment options .................................... CS7952 Integrated Development Environments The Components of an IDE (deluxe) What makes us giddy in an IDE? • smart feedback in the editor – learns API of new code – suggestions • coding aids in editor – templates – common refactoring (transformations) • documentation generation • test integration • integration with version ctrl .................................... 2 IDE Examples emacs The *nix swiss army knife of editors, emacs has long functioned as a basic IDE: • syntax-highlighting editor • build support (invokes *nix make) – parses error messages from compilers & other tools • debugger interface • works directly with many version control systems .................................... References, if you are unfamiliar with this: • Compiling in emacs • emacs Debugging mode (CS252) CS7953 Integrated Development Environments emacs Strengths and Weaknesses • highly portable • supports virtually any language you would have a compiler for • even in windowed mode, leans toward keyboard rather than mouse – (not sure if that’s a pro or a con) • outdated interface • high learning curve ...................................
    [Show full text]
  • Jgrasp Tutorials
    Tutorials Tutorials for the jGRASP™ 1.8.7 Integrated Development Environment James H. Cross II and Larry A. Barowski Auburn University September 2, 2009 Copyright © 2009 Auburn University All Rights Reserved The Tutorials have been updated with each new major release of jGRASP since their original inclusion in the jGRASP Handbook (Copyright © 2003 Auburn University). James H. Cross II is a professor of computer science and software engineering at Auburn University. Larry A. Barowski is a research associate in computer science and software engineering at Auburn University. Printing Considerations The Tutorials are formatted for 5.5 in. x 8.5 in. pages with a base font of 10 point Times New Roman. This improves on-screen viewing and facilitates booklet printing (four pages per sheet of 8.5 in. x 11 in. paper when printing on both sides). On Adobe Acrobat’s Print dialog, select “Booklet Printing” under Page Scaling. The default Booklet Subset will be Both sides. The Tutorials may also be printed “two pages per sheet” on 8.5 in. x 11 in. paper by selecting “Multiple pages per sheet” under “Page Scaling” on Adobe’s Print dialog. This may yield a slightly smaller overall font than booklet printing. If “Page Scaling” is set to “None” (the default) or “Shrink to printable area”, the Tutorials will be printed “one page per sheet” with the font slightly larger than booklet printing. If “Page Scaling” is set to “Fit printable area”, the Tutorials may be printed “one page per sheet” with the font even larger. Regardless of the pages per sheet or page scaling you select, it is strongly recommended that you print a few test pages before printing a large number of pages.
    [Show full text]
  • Getting Started with Jgrasp for Java
    Getting Started with jGRASP for Java Maria Litvin Phillips Academy, Andover, Massachusetts Gary Litvin Skylight Publishing 1. Introduction 2. Downloading and Installing jGRASP 3. Creating a Project and Running “Hello World” 4. Bringing Existing Java Files into jGRASP 5. Command-Line Arguments and User Input 6. Running GUI Applications 7. Workspaces 8. Using Jar Files 9. Creating Jar Files Copyright © 2018 by Maria Litvin, Gary Litvin, and Skylight Publishing All rights reserved. Teachers are authorized to make copies for face-to-face teaching. 2 GETTING STARTED WITH JGRASP FOR JAVA 1. Introduction This document serves as a brief introduction to jGRASP. See more detailed information on their web site. jGRASP was developed by the Department of Computer Science and Software Engineering in the Samuel Ginn College of Engineering at Auburn University. The latest version of jGRASP, as of June 2018, is Release 2.0.4_04. jGRASP is a free download. According to www.jgrasp.org, jGRASP is a lightweight development environment, created specifically to provide automatic generation of software visualizations to improve the comprehensibility of software. jGRASP is implemented in Java, and runs on all platforms with a Java Virtual Machine (Java version 1.5 or higher). jGRASP not only enables the user to edit and run Java programs, it can also produce what its developers call Control Structure Diagrams (CSDs) for Java (and other programming languages). Our primary concern here is how to use jGRASP as an IDE (Integrated Development Environment) for editing and running Java programs. 2. Downloading and Installing jGRASP First make sure the Java Development Kit (JDK) is already installed on your computer.
    [Show full text]
  • California State University Sacramento Child Safety
    CALIFORNIA STATE UNIVERSITY SACRAMENTO CHILD SAFETY: PROJECT DOCUMENTATION PROJECT GUARDIAN Authors: Zohaib ARSHAD Jashanjit BADWAL Leonardo JACOBO Didier MPONTE Harpreet SIDHU Instructor: Dr. BELKHOUCHE November 30, 2015 i CONTENTS Abstract 1 Index Terms 1 I Introduction 1 II Societal Problem 1 III Design Idea 1 Feature: Voice Communication . .2 III-A Feature: Voice Communication ........................................2 III-B Feature: Mobile GSM Network Connection ................................2 III-C Feature: Global Position System Tracking .................................2 III-D Feature: Parental Control Application ....................................3 III-E Feature: Electrocardiogram ..........................................3 III-F Feature: Panic Button .............................................3 III-G Feature: Compass ...............................................4 III-H Feature: Pedometer ..............................................4 III-I Feature: Wireless Network Usage ......................................4 IV Funding: “The Pitch” 5 V Planning for the Spring 2016 Semester 5 VI Work Breakdown Structure 6 VII Project Time Line 8 VIII Risk Assessment and Mitigation’s 8 IX Task’s Assigned 8 X User Manual 11 X-A Android Application . 11 X-B Wearable Device . 11 XI Design Documentation 11 XI-A Hardware . 11 XI-B Software . 11 XII Integration Plans 12 XIII Photographic Documentation 12 XIV Conclusion 13 Appendix 14 References 14 Glossary 15 Datasheet and Schematics 16 Resumes 109 ii LIST OF FIGURES 1 Work Breakdown Structure Diagram . .7 2 Application Overview . 11 3 Application Communication . 11 4 Application Miscellaneous . 11 5 GSM/GPRS/GPS . 12 6 Intel Edison Chip . 12 7 Intel Edison Board . 12 8 GSM/GPRS/GPS Working Prototype . 13 LIST OF TABLES I Work Breakdown Structure . .6 II Project Time Line . .8 III Zohaib’s Assignments . .9 IV Jashanjit’s Assignments . .9 V Leonardo’s Assignments .
    [Show full text]
  • 1 Play with Drjava & and the Scanner Class
    CS100M Lab Exercise 8 1 Play with DrJava & and the Scanner class The programming environment that we are going to use is called DrJava. It provides both the abilities to execute a program and to work interactively with the system. In Java, getting input from users requires the use of an object. We’ll talk much more about objects and classes later, but for now you will just get some experience with using an object from the Scanner class to getting keyboard input. 1.1 Compiling and running a program 1. Download from the Lecture Materials page the file Earth.java under the March 13 lecture. Save it to a directory of your choice, e.g., the Desktop. Now start up DrJava and open the file Earth.java. Read the code to make sure you understand it. Have you noticed that you can use a printf method for printing? printf behaves just like fprintf from Matlab. Compile the file (click Compile All) and then run it (select Tools—Run Document’s main Method). 2. Change the print statement to use the println method. (You cannot control the number of decimal places here.) Compile and run the program again. 3. Now change the program to accept user input from the keyboard. Remove the statement that declares variable r and assigns a value to it. You will need an object from the Scanner class to read input. The following statement will create such an object and call it keyboard: Scanner keyboard= new Scanner(System.in); You will learn why the statement looks like this later, but for now simply use the statement.
    [Show full text]