代写ITD102: Computer Technology Fundamentals Workbook 2: High Level Technologies (23CTP1)代写Java程序

ITD102: Computer Technology Fundamentals

Workbook 2: High Level Technologies (23CTP1)

This document contains the practical exercises questions relevant to the second part of this unit.

Raspberry Pi: All students need a Raspberry Pi. There is no textbook to purchase but you do need a Raspberry Pi. It’s important to obtain a Raspberry Pi soon – see the Raspberry Pi notes on Canvas for details, under Overview -> Things that you need. If you are an on-campus student you can borrow a kit containing everything that you will need from reception.

Students located overseas will need to source their own components.

MARKING: The practical exercises are competency based and will be checked by your tutor during the corresponding class or next class. Online students may instead submit a video of their demo with the same deadlines. All students need to demonstrate competency in the practical exercises; you may try multiple times (before the due date). The exercises are pass / fail – there are no part marks. The four practicals are worth 5% in total (1.25% per practical).

DUE DATE: All practical exercises must be successfully demonstrated to your tutor in person during your scheduled tutorial class on the week delivered or the following week at the beginning of the class; this also allows for public holidays. Late submissions cannot be marked.

These practical exercises should be done in a group of two (when possible), but you will be assessed individually.

Class 5: Languages and Libraries

The fifth lecture describes the two key methods by which we manage complexity in computer systems: high level programming languages and software libraries. These techniques are used extensively at all levels of a computer system from low level hardware and software to business processes and workflows.

In this class you will:

· Investigate programming language implementation techniques in practical exercises

· Explore programming languages and software libraries and APIs in the further work exercises

Practical Exercises

Use a command line shell on a Raspberry Pi for these exercises. You do not need to provide a written answer to these questions: rather you need to demonstrate competence to answer some of the questions to your tutor.

1. Compiling

Here is a very simple C program which prints out the text “Hello World”. Traditionally hello world is the first program people write and one which people like to see written in lots of different programming languages. C programs are typically compiled to machine code for execution on a particular kind of machine (CPU and Operating System).

// Hello World program in C

#include<stdio.h>

main()

{

    printf("Hello World");

}

a) Enter this hello world program into a file called hello.c e.g. using the nano text editor (your tutor will show you how). To run the program we must first compile it into machine code which the computer understands. Compile the program using the gcc compiler thus gcc hello.c . This will produce an executable machine code program in a file called a.out You can run this by entering ./a.out at the command prompt.

b) Rather than compiling your hello world program directly to binary machine code you can compile it to assembly code so you can view the textual representation of the machine code instructions. You can do that like this: gcc –S hello.c The assembly code will be put in a file called hello.s Look at this file (e.g. using nano), you should be able to find the text “Hello World”. You can carefully change this text, then convert the assembly file to machine code using gcc hello.s, then run the revised machine code using ./a.out as before. Congratulations - you’ve just programmed the computer in its own low level machine code language.

c) Look at the assembly code in hello.s, identify a machine instruction. Look up the instruction on the internet and find out what it does.

2. Interpreting

Here is a very simple python program which prints out the text “Hello World” and the length of this text. Usually the python language is implemented by translating to a simpler language (byte code) which is then interpreted by a program.

# Hello World program in python

print "hello world"

print len ("hello world")

a) Type the python program into a file called hello.py you can run the program by typing python hello.py 

b) Python runs programs by compiling them to an intermediate byte code language then interpreting this language (which lies between machine code which the computer can directly understand and the high level Python language). Python bytes codes are often written to files with a suffix .pyc. however these files are unreadable. To look at the Python byte codes for the hello world program use the following command: python /usr/lib/python2.7/dis.py hello.py

c) Choose a byte code instruction and investigate what it does (http://docs.python.org/2/library/dis.html)

3. JIT Compilation

The Java language uses JIT compilation: programs are compiled to bytecode using a compiler then later the bytecode can be run using a JIT compiler which compilers the bytecodes to machine code which is then immediately run.

Here is a simple Java program:

public class hello

{

    public static void main(String[] args)

    {

        System.out.println("Hello World!");

    }

}

Put this in a file called hello.java; it must have that exact file name. The program can be compiled to bytecode (called a classfile in Java) thus:

javac hello.java

You can run the program using the Java JIT thus:

java hello

You can look at the bytecodes thus:

javap -c hello.class

Once you have completed these practical exercises individually demonstrate your understanding and competency to your tutor. You need your tutor to be satisfied that you have this new practical knowledge and skill in order to pass this module.

End of Class 5.

Class 6: The Web

The sixth lecture concerns the world wide web: what it is, how it evolved and how it works. The web is ubiquitous and has become the fabric which connects almost everyone for business, education, healthcare, government and leisure. Thus, it is important for everyone to understand the basics of how it works and how it is evolving.

In this class you will:

· Undertake practical exercises to understand how the web works and to investigate some web technologies.

· Understand the evolution of web technologies and some current web technologies.

Practical Exercises

You will need to use a command line shell on a Raspberry Pi for some of these exercises and a PC or Raspberry Pi with a graphical interface for other exercises. You do not need to provide a written answer to these questions: rather you need to demonstrate competence to answer some of the questions to your tutor.

1. HTTP Protocol: Web Clients and Servers

In this exercise we shall investigate how web clients e.g. browsers and servers work. You will need to be on the QUT network for these exercises.

a) On Linux a useful command line tool for getting web pages is wget. Use wget to get some web pages and look at their HTML e.g. wget www.qut.edu.au

2. Cascading Style. Sheets

You will need to do this exercise on a PC (or a Raspberry Pi using its graphical interface).

a) Investigate cascading Style. Sheets (CSS). Use some different external style. sheets to style. a HTML web page in different ways. There are many CSS tutorials e.g.: http://www.w3schools.com/html/html_css.asp. This tutorial will let you interactively explore different features of CSS. If you have never written any HTML before you will need to read some of the earlier tutorials e.g. http://www.w3schools.com/html/html_intro.asp.

3. HTML 5

You will need to do this exercise on a PC (or a Raspberry Pi using its graphical interface).

a)  Investigate some of the new features of HTML 5, for example the canvas element e.g. try some of the interactive exercises here http://www.w3schools.com/html/html5_canvas.asp. For more advanced HTML 5 fun see e.g. http://www.html5canvastutorials.com/ 

Once you have completed these practical exercises individually demonstrate your understanding and competency to your tutor. You need your tutor to be satisfied that you have this new practical knowledge and skill in order to pass this module.

End of Class 6.

Class 7: Security

The seventh lecture concerns computer security at the operating system, network and hardware level. The more our world becomes connected and automated the more important computer security becomes. Computer security affects all aspects of computer systems. This class focusses on some key technologies for securing computer systems.

In this class you will:

· Undertake some practical experiments with some of the security features in Linux including: file permissions, network security and encryption

· Investigate aspects of computer security as it applies to the home and enterprises

Practical Exercises

These exercises should be undertaken on a Raspberry Pi.

You do not need to provide a written answer to these questions: rather you need to demonstrate competence (evidence) to answer some of the questions to your tutor.

1. Linux file permissions

See: https://www.hostinger.com/tutorials/linux-commands

a) Investigate Linux file permissions, in particular create a file which can only be read and written by the user who creates it e.g. user “pi”. Use the chmod command to change the file permissions.

b) You have written a convenient script. to print out useful system information:

#!/bin/bash

echo "Hello, $LOGNAME"

echo "Current date is `date`"

echo "User is `who i am`"

echo "Current directory `pwd`"

Put this in a file called sysinfo.sh and make the file executable using chmod, so that it can be run thus: ./sysinfo.sh You may find such scripts useful for your mini-project. We will discuss them further in the third module.

Hints: https://www.andrewcbancroft.com/blog/musings/make-bash-script-executable/

2. Public-key cryptography Watch and Discuss with group

https://www.youtube.com/watch?v=y2SWzw9D4RA

End of Class 7.

Class 8: Mobile, Cloud and the Internet of Things

The eight lecture discussed how Moore’s Law is giving rise to new classes of technology, including the cloud, mobile devices and the Internet of Things (IoT). This class is designed to lead into potential mini-projects and to show you how to make and understand some of the demos which have been shown in lectures, like the internet security camera.

In this class you will:

· Build one of:

o A simple mobile app, or

o A virtual machines, or

o A IoT device (this is a good basis for a mini-project)

· Investigate different technologies associated with mobile, cloud and the Internet of Things.

Practical Exercises

Undertake one of the following practical exercises. You do not need to provide a written answer to this question: rather you need to demonstrate competence to answer the question to your tutor.

1. Virtual Machines

Virtual machines (VMs) provide a way to separate operating systems from hardware. They are used in Infrastructure as a Service cloud computing systems like Amazon EC2. The Oracle VirtualBox VM system (www.virtualbox.org) is installed on PCs in the labs (if not you can install it yourself).

a) What is a hypervisor?

b) Investigate VirtualBox. How can you control the amount of memory and CPU time allocated to a virtual machine? Try changing the amount of memory and CPU allocated to e.g. an Ubuntu virtual machine and investigate the effects of doing so.

c) Why might it be necessary to control the resources allocated to a virtual machine?

d) Find where the disks and settings for virtual box VMs are stored. Try moving a virtual machine from one PC to another by copying the settings and disk onto a large usb memory key and then copying these onto a different machine from the usb key. Try running the VMs on the new machine – you have just manually migrated a virtual machine from one computer to another.

e) Investigate the different networking options available with virtual machines.

2. Mobile apps

Use the app inventor system http://appinventor.mit.edu to build a simple mobile application. For example follow these instructions to make a magic 8 ball http://appinventor.mit.edu/explore/teach/magic-8-ball.html or select another simple/short exercise from here http://appinventor.mit.edu/explore/ai2/tutorials.html. You will need a google account in order to do this exercise and you will need to install the app inventor software on your PC (or Android device). The key to this exercise is to carefully follow the instructions. Feel free to create your own app or embellish an existing one. You can run programs either on the emulator or on your Android phone, if you have one. Show your finished application to your tutor.

3. Internet of Things

Note these exercises are particularly suitable starting points for mini-projects. There are many cloud services for IoT devices. They enable you to connect devices to its cloud based service to control and monitor them and collect data. Here is a list of some popular IoT services which you can connect your Raspberry Pi to:

· Sparkfun data service: https://data.sparkfun.com/ tutorial:

https://learn.sparkfun.com/tutorials/pushing-data-to-datasparkfuncom/raspberry-pi-python 

· Grove Streams https://grovestreams.com/ tutorial https://www.grovestreams.com/developers/getting_started_rpi.html 

· Thingspeak https://thingspeak.com/ tutorial https://www.dexterindustries.com/BrickPi/brickpi-tutorials-documentation/projects/thingspeak-temperature-log/ 

· Adafruit IO  https://io.adafruit.com/ tutorial https://learn.adafruit.com/adafruit-io-basics-neopixel-controller 

You may need to adapt some of these tutorials e.g. to upload something local. For example an interesting built-in sensor is the Raspberry Pi CPU temperature sensor which can be accessed from the command line thus: /opt/vc/bin/vcgencmd measure_temp

Another alternative is to investigate how to upload a file to dropbox from the raspberry Pi e.g. upload a photo. https://www.raspberrypi.org/magpi/dropbox-raspberry-pi/ 

Once you have completed these practical exercises individually demonstrate your understanding and competency to your tutor. You need your tutor to be satisfied that you have this new practical knowledge and skill in order to pass this module.

End of Class 8.





热门主题

课程名

eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 nbs-7041x mbas902 comp-1027 dpst1091 comp7315 econ0060 comp9417 comp3425 litr1-uc6201.200 ee1102 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst math39512 cosc2803 omp9727 ddes9903 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 cisc102 07 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 efim20036 mn-3503 math21112 comp9414 fins5568 comp4337 bcpm0054 comp(2041|9044) 110.807 bcpm000028 info6030 inft6800 bma0092 math20212 cs365 ce335 math2010 ec3450 comm1170 cenv6141 ftec5580 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 econ7230 math350-real math2014 eec180 msinm014/msing014/msing014b stat141b econ2101 fit2004 comp643 compsci 369 bu1002 cm2030 mn7182sr ectb60h3s ib2d30 ohss7000 fit3175 acct7104 econ20120/econ30320 math226 127.241 info1110 37007 math137a mgt4701 comm1180 fc300 ectb60h3 llp120 bio99 econ7030 csse2310/csse7231 comm1190 110.309 125.330 csc3100 bu1007 comp 636 qbus3600 compx222 stat437 kit317 hw1 ag942 fit3139 115.213 ipa61006 6010acc econ214 envm7512 fit4005 fins5542 slsp5360m 119729 cs148 hld-4267-r comp4002/gam cava1001 or4023 cosc2758/cosc2938 cse140 fu010055 csci410 finc3017 24309 bsys702 mgec61 cive9831m pubh5010 fsc60504 5bus1037 caes1000 plana4310 info90004 p6769 bsan3209 ap/adms4540 ast101h5f plan6392 625.609.81 csmai21 fnce6012 misy262 ifb106tc csci910 502it comp603/ense600 4035 csca08 8iar101 bsd131 msci242l csci 4261 elec51020 blaw1002 ec3044 acct40115 csi2108–cryptographic 158225 7014mhr econ60822 ecn302 philo225-24a acst2001 fit9132 comp1117b ad654 comp3221 st332 cs170 econ0033 engr228-digital
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图