1 / 27

COMPSCI 340 & SOFTENG 370 Semester 2 - 2013

COMPSCI 340 & SOFTENG 370 Semester 2 - 2013. Tutorial 1. About the tutor. Name: Ahmad Obidat Qualifications: PhD in Information System, the University of Auckland, 2012 – Present Education Specialist in Computer Science Education, Florida Institute of Tech., 2009

lok
Download Presentation

COMPSCI 340 & SOFTENG 370 Semester 2 - 2013

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. COMPSCI 340 & SOFTENG 370 Semester 2 - 2013 Tutorial 1

  2. About the tutor • Name: Ahmad Obidat • Qualifications: • PhD in Information System, the University of Auckland, 2012 – Present • Education Specialist in Computer Science Education, Florida Institute of Tech., 2009 • Master of Science in Computer Science Education, Florida Institute of Tech., 2006

  3. Office hours: Thursday 1 - 3pm or by an appointment.Office hours will be held in the open area right straight from Robert’s office (Rm 303.488).Location for appointment(s) to be determined. How can you contact me? • Email: a.obidat@auckland.ac.nz

  4. Today’s Agenda • Installing Ubuntu • Java vs. Python • Installing necessary apps for the course

  5. Linux Distributions • The most popular are Ubuntu, Red Hat, Fedora, SuSE, PCLinuxOS, and MEPIS • Which one to use? • Any one should be fine • Which one are we going to use? • Ubuntu • Why Ubuntu? • User friendly • Large user community

  6. Installation • Mainly, Ubuntu can be configured using three different ways: • To run Ubuntu without installing it on your hard drive, the best way is to run it from CD/DVD https://help.ubuntu.com/community/BurningIsoHowto • Dual-boot system. Namely, you will have both Windows and Linux available for booting http://www.ubuntu.com/download/help/install-ubuntu-with-windows • Using VMware Player: it creates isolated virtual machines (we are going to use this method) • Mac laptop and desktop computer users: you should be able to perform your tasks on the native platform, but installing VM might be helpful for future purposes

  7. Installation using VMware Player • Download the appropriate version of Ubuntu to your hard drive from: http://www.ubuntu.com/download/desktop • Download VMware Player for Windows 32-bit and 64-bit from: http://www.vmware.com/download/player/download.html • Double click on VMware-player-4.0.6 exe file • Make sure you change the hardware settings when installing (see next slides)

  8. Select create New Virtual Machine

  9. Select the second option and browse to the iso file you downloaded.

  10. Personal data

  11. Enter a name for the virtual machine

  12. Specify Disk Capacity Give it up to 30 GB

  13. New Virtual Machine Wizard Select Customize Hardware

  14. Specify the amount of memory allocated for the virtual machine Use the slider to choose the appropriate size as it is advised by the legend.

  15. Processor Select number of processor cores.

  16. 3D Graphics Tick off the checkbox for “Activate 3D graphics”.

  17. Java vs. Python • Python programs are typically 3-5 times shorter than equivalent Java programs • Python programs take much less time to develop than Java ones • Pythonis built-in high-level data types and dynamic typing • Python provides an operating system module which gives connection to Unix system calls.

  18. Java vs. Python Java Python print("Hello, world!") public class HelloWorld { public static void main (String[] args) { System.out.println("Hello, world!"); } }

  19. Java vs. Python Java Python defsumRange( first, last ) : total = 0 i = first while i <= last : total = total + i i = i + 1 return total start = 1 end = 100 theSum = sumRange( start, end ) print ("The sum of the integers between", start,\ "and", end, "is", theSum) public class MainClass { public static void main(String[] args) { int start = 1; int end = 100; inttheSum = sumRange( start, end ); System.out.println ("The sum of the integers between " + start + " and " + end + " is " + theSum); } public static intsumRange(int first, int last) { int total = 0; inti = first; while (i <= last ) { total+= i; i ++; } return total; } }

  20. Java vs. Python Java Python gradeList = [ 85, 90, 87, 65, 91 ] print (gradeList) public class PrintList { public static void main(String[] args) { int [] gradeList = { 85, 90, 87, 65, 91 }; System.out.print( "[" ); for( int i = 0; i < gradeList.length; i++ ) { System.out.print( gradeList[ i ] ); if( i < gradeList.length-1 ) System.out.print( ", " ); } System.out.println( "]" ); } }

  21. Installing Python 3 Click on “Ubuntu Software Center"

  22. Installing Python cont. Click on “Developer Tools”

  23. Installing Python cont. Click on “Python”

  24. Installing Python cont.

  25. Installing Python cont. Click on “Install”

  26. Installing Python cont.

  27. References • Python v3.3.2 documentation • Python operating system interfaces • Python 2 for Java programmers • Java for Python Programmers (1) • Java for Python Programmers (2) • From Python to Java

More Related