Advanced Java Programming and Mobile Application Development

Home Admissions Course Guide Advanced Java Programming and Mobile Application Development

This Course Guide has been taken from the most recent presentation of the course. It would be useful for reference purposes but please note that there may be updates for the following presentation.

COMP S311

Advanced Java Programming and Mobile Application Development

COMP S311 Advanced Java Programming and Mobile Application Development is a ten-credit, higher-level course for the Bachelor of Computing (BCOMP) and the Bachelor of Computing with Honours in Internet Technology (BCOMPHIT). The course assumes that you have fundamental knowledge of computer programming, data structures, and algorithm design. Such knowledge is covered in COMP S201 Computing Fundamentals with Java and COMP S258 Computer Programming and Problem Solving. You are therefore advised to have completed these two courses prior to taking COMP S311.

The course is composed of two main parts: advanced Java programming and mobile application development. The first part has five study units which aim to develop your ability to create object-oriented programs in Java in order to tackle computing problems that command the use of multiple threads, networking, database, Web servers, socket-based communication, and cryptography. The second part consists of five study units which aim to equip you with a sufficient level of knowledge to develop mobile applications in the Android platform.

This course teaches you programming by explaining concepts, describing tools and libraries, discussing illustrative examples, and letting you practise by solving problems. In particular, you will be shown examples of Java programs that solve a variety of problems with varying levels of difficulty, and Android applications that demonstrate essential Android development concepts and skills. Activities and self-tests sprinkled throughout the course units ask you to solve problems in order to learn by doing.

Among higher-level computing courses offered at HKMU, this course emphasizes the development of your ability to write computer programs in a large variety of contexts. If you aspire to pursue a programming career, this course is of utmost importance. If a programmer position is not your career choice, these programming abilities can still help you to better communicate with programmers as a user. Coupled with management skills, programming knowledge can make you a more effective manager of programming teams.

 

Course aims

The aims of the course are to:

  • Enable you to create maintainable software in Java to meet a great variety of computing requirements.
  • Provide you with a foundation in designing and developing Android applications.

Course learning outcomes

Upon completion of this course, you should be able to:

  • Develop Java applications that involve multithreading and networking.
  • Evaluate the Java security model.
  • Develop Java applications using cryptography.
  • Implement database access in Java applications.
  • Develop JSP web applications.
  • Explain the architecture of the Android platform.
  • Apply Android APIs in mobile programming.
  • Design and implement basic Android applications.

Print materials

In addition to this Course Guide, the course has the following important components. Please ensure that you have all of these materials available.

 

Study units

There are ten study units in COMP S311 Advanced Java Programming and Mobile Application Development. Each unit consists of between three and four weeks' worth of part-time work. The study units outline the key concepts of each section, summarize key issues, explain the relevant theories and practices, and comment on related readings. There are self-contained learning materials and/or guided textbook readings on a number of topics. Each unit contains self-tests and activities to reinforce your assimilation of the issues under discussion.

 

Unit 1 Exceptions, lambdas and streams
This unit describes evolving Java language syntax and libraries which make your programming work easier, more concise, and more powerful. You will first learn the use of exceptions to handle errors in a robust way, and new syntax for catching multiple types of exceptions and automatic closing of resources. You will then study lambda expressions for representing code blocks concisely, replacing many uses of anonymous inner classes, and streamlining the functional programming style in Java code. Finally, you will learn how to use the stream library to manipulate groups of objects as a pipeline of operations, optionally and easily in parallel.

 

Unit 2 Concurrency and multithreading
This unit covers multithreading, which exploits the multi-core capability of modern computers. You will learn how to create and manipulate threads to implement concurrent Java applications, and how to resolve common synchronization issues. Data structures with built-in support for concurrency and efficient thread management by thread pools are explained and illustrated in Java programs.

 

Unit 3 Developing networked applications
This unit explains how to implement networking in Java applications using sockets, datagrams, and over the Web. In particular, you will acquire knowledge of Java socket and stream libraries for connection-oriented communication between clients and servers, datagram sockets and datagram packets for connectionless communications, and the URL framework for accessing Web resources.

 

Unit 4 Database programming and JSP
This unit introduces database and Web programming, two essential topics in Java enterprise application development. For database programming, you will learn how to use Java Database Connectivity, or JDBC, in Java applications to connect a database server for retrieving and updating data. You will also learn about Web application development using JavaServer Pages, or JSP, for providing dynamic responses to client requests from Web browsers.

 

Unit 5 Security in Java applications
This unit discusses security measures in the Java platform and libraries for securing data in Java applications. You will learn how class loaders validate the integrity of Java class files, and how security managers check permissions and control what operations are allowed. In addition, you will learn the use of digital signature in Java applications to ensure data has not been altered, and has really come from its claimed author. Encryption is also explained, and Java programs are illustrated to guarantee that confidential information can only be viewed by its intended users.

 

Unit 6 Foundations of Android programming
This unit provides a foundation for developing Android applications. You will first study the concepts behind the Android platform, and the essential tools for Android programming. You will then learn the structure and life cycle of Android applications, and how they are managed by and interact with the host device. A number of important issues are also covered in the unit, including user interface programming, security considerations, and application deployment.

 

Unit 7 Developing Android applications
This unit explores a number of APIs that are useful in developing Android applications. You will learn more advanced user interface components, the use of intents for inter-activity communication, and libraries of concurrency, networking, and location-based services with illustrative examples. The unit also explains the security and permission settings for using some of these libraries. Finally, issues related to optimizing Android applications will be discussed.

 

Unit 8 Data access, services and receivers
This unit teaches you how to use various forms of data access in Android apps — files, shared preferences, and databases. In addition, you will learn three types of application components: content providers for sharing data between applications, services for background operations, and receivers for handling broadcast messages from the Android system.

 

Unit 9 Enhancing application design
This unit focuses on design and visual aspects of Android applications. In this unit, you will learn the use of style and theme resources to maintain the consistent appearance of user interface components. In addition, you will study the implementation of navigation between screens of an application, graphics and drawing, animations, media playback, and device vibration.

 

Unit 10 Building an Android messaging app
This unit takes you through the development of a simple yet complete messaging application by applying the tools and techniques presented in the previous units. The unit examines the application's requirements, overall design, design and implementation of the database, the server and the Android app. Possible enhancements are also discussed to conclude the unit.

 

Custom textbook

A custom textbook is required for COMP S311 and will be provided to you. The contents of the textbook are extracted from the following books:

  • Horstmann, C S (2019) Core Java Volume I Fundamentals, 11th edn, Prentice Hall.
  • Horstmann, C S (2019) Core Java Volume II Advanced Features, 11th edn, Prentice Hall.

Online and multimedia materials

Online resources

You may be required to refer to the Online Learning Environment (OLE).

 

Equipment required

You are expected to have the following minimum equipment. However, this list should be taken with a pinch of salt. Today's computers run multiple processes concurrently, so the actual minimum hardware requirement depends very much on what software has been installed or is running in the background. It is quite possible for a particular computer to run better than another computer of a higher specification.

 

Hardware

  • PC with Intel i5 (or equivalent) quad-core processor or above
  • 4GB RAM minimum, 8GB RAM recommended
  • 4GB of free disk space
  • Internet access
  • Video display resolution at 1280 × 800 or higher

Software

  • Microsoft Windows 7/8/10, Mac OS X 10.10 to 10.13, or Linux GNOME/KDE desktop
  • Recent versions of Chrome, Firefox, Edge/Internet Explorer or compatible
  • Java 8, NetBeans, Android Studio, and other tools (as instructed in the course materials)

Note that if you choose to use Mac or Linux, you may not be able to get platform-specific help from your tutor.

Up-to-date URLs to download the software will be provided on the course website.

 

Assignment File

You can access the assignment file on the OLE. The nature of the assignments is described in the 'Assignments' section below.

 

Presentation Schedule

The presentation schedule is available on the OLE. It gives the dates for completing assignments, and attending tutorials and surgeries.

COMP S311 carries two formal activities for assessment: assignments and a final examination. The assignments contribute to 30% of the course mark, while the final examination contributes the remaining 70% of the course mark. You are required to have obtained at least 40% in the assignment scores, and 40% in the final examination to pass this course.

 

Assignments

You are required to complete four assignments and submit them to your tutor for evaluation and grading. Each assignment will assess your grasp of the materials covered in the respective units.

Only the best three of the four assignments are counted towards your final course grade. Not submitting the assignment with the lowest score will not directly impact your final grade. However, not attempting one of the assignments may hurt you indirectly in the final examination due to less preparation. You are therefore encouraged to attempt all four assignments.

The combined marks for the assignments will account for 30% of the course's overall assessment.

 

Assignment extension policy

The assignment policy of the University as stated in the Student Handbook should be observed. You are required to submit the assignments for this course in accordance with the dates communicated by your Course Coordinator. You may apply for a submission extension on the grounds of illness, accident, disability, bereavement or other compassionate circumstances.

Applications for extensions must be submitted online via the OLE. Please note the following:

  • Supporting documents must be submitted to justify applications for extensions of over seven days.

  • Applications for extensions should normally be lodged before or on the due date.

  • Applications are considered by:
    • your tutor for extensions of up to seven days;
    • the Course Coordinator for extensions of 8 to 21 days; and
    • the Dean for extensions of over 21 days

After an assignment is submitted via the OLE, it is your respon sibility to check that the assignment has been successfully submitted. Extension applications due to any problem with uploading will not be accepted. The University cannot accept any responsibility for assignments that are not received by your tutor due to any problem with submissi on via the OLE. As a precaution, you are advised to keep a copy of each assignment you submit.

According to the University's policy, no extension of the due date will be allowed for the final assignment. This policy will be strictly enforced. Any late submission of the final assignment will result in the score of the assignment being adjusted to zero.

 

Final examination and grading

The final examination for COMP S311 is of three hours' duration and is worth 70% of the total course grade. This final examination will be a closed-book written examination.

 

Course marking scheme

 

AssessmentsMarks
Assignments 1–4Best 3 of 4 @ 10% each = 30% of course marks
Final examination70% of overall course marks
Total100% of course marks

 

ModuleUnitTitleWeeksAssessment
Advanced Java programming1Exceptions, lambdas and streams4Assignment 1
2Concurrency and multithreading3
3Developing networked applications3
4Database programming and JSP4Assignment 2
5Security in Java applications3
Android application development6Foundations of Android programming4Assignment 3
7Developing Android applications4
8Data access, services and receivers4Assignment 4
9Enhancing application design4
10Building an Android messaging app3
  Revision2 
  Total38 

The biggest temptation that students face, when they are short of time, is just to read the course materials. When they get to a learning activity or self-test, they flip straight to the back of the study unit to see the suggested answer. It saves time, and students still know the correct answer, right? Wrong! Terribly wrong! Many contemporary educationists believe that learning is not a process that happens when people listen to a lecture or read a book passively. They think that learning takes place as people actively construct knowledge. This is especially relevant when learning programming. You have to practise programming in order to learn programming. Do not take a shortcut that compromises your learning. Attempt the learning activities and self-tests presented in the study units.

When done properly, working with fellow students on difficult learning activities or assignments can be beneficial. However, doing so without acknowledging the contributions of other students in your own work is plagiarism. It may happen that, after enough cosmetic changes have been made, an act of cheating may not be caught by the tutor who is marking an assignment. But in this case, the student's learning will suffer, and it will show in the final examination. Be an honest and virtuous student.

 

Tutors and tutorials

Compared to the mega classes attended by hundreds of students in a typical university, the tutorials with 30 students or so at the HKMU provide a good opportunity for you to meet your classmates and to get to know your tutor. You will find that support and encouragement from classmates and tutors are very helpful.

Attendance in tutorials is optional, but you are urged to take advantage of them. You can get the most from tutorials by pre-studying the relevant materials, making comments, and asking questions. Remember that learning does not happen passively: your active participation in tutorials is crucial.

 

The art of studying

You probably have acquired an arsenal of study techniques over the years. However, you may still be able to sharpen your study skills further, for example by reading a book on study skills. If you have not used the HKMU library before, try it now. Our library has a collection of e-books that you can access over the Internet. For example, when you search the e-book collection by keywords 'study skills', it returns the names of a few relevant e-books. You can click on appropriate links or buttons to read the books online. Every student and tutor has an account to access the HKMU online library. It is your privilege. Use it.

 

Motivation

An important factor that distinguishes strong students is their motivation. Having enrolled in COMP S311, you are at least motivated to pass this course. We call this type of motivation extrinsic because your reward for doing it is from outside, such as getting a good grade. Hopefully this is not the only motivation you have. If you enjoy an activity, you are said to have an intrinsic motivation.

Programming is the main focus of this course. If you enjoy programming, then this course will be fun, and you will also do very well in it. Listed below are three intrinsic and one extrinsic rewards of programming:

  • Designing and writing a program is creative and fun. (intrinsic)
  • Getting a program to work is satisfying. (intrinsic)
  • You are in control — you can change program behaviour by altering a statement. (intrinsic)
  • You can get paid for doing something fun — assuming that you are good at it and get a programming job. (extrinsic)

You can probably find additional motivations by yourself or by reading the material of David Intersimone (2006) and Fred Brooks (1995) that we have listed in the 'References' section of this Course Guide.

 

Time management

While you take this course, you may be holding a full-time job and have family responsibilities. You also should spend time with your friends. It may seem like everyone is competing for your attention. Therefore, you are advised to practise self-discipline so that you can:

  • Keep up with the schedule. You cannot predict what life will throw at you next month. Don't always assume that you will have the time to catch up later.
  • Start working on your assignments early. Many assignment questions involve programming. Staying up just the night before the due date often is not beneficial to your grade or your learning.
  • Organize your time productively.
  • Avoid distraction — sometimes you should disconnect from social media / chat apps.

Stress management

A little bit of pressure can help us perform well. But as pressure becomes excessive, our physical and mental health will suffer — as well as our performance. Know your own limits so you know when you should take it easy. Exercise regularly. Eat healthily. Spend time with friends and loved ones. In the 'References' section of this Course Guide are two articles about stress management from the Mayo Clinic, a reliable online source of health information.

Programming scares some students. However, with appropriate motivation, good work habits, support from your family, friends, classmates and tutors, you don't have to worry. With enough time spent studying and practising, you can even make up for certain weaknesses in your background. We hope that you enjoy the course and do well!

Brooks, F D (1995) The Mythical Man-month: Essays on Software Engineering, Anniversary edn, Addison-Wesley.

Intersimone, D (2006) Why Programming is Fun, Dr. Dobb's Portal, http://www.ddj.com/architect/196603871.

Mayo Clinic staff (2008) 'Tips for Coping with Stress', Mayo Clinic, http://www.mayoclinic.com/health/coping-with-stress/SR00030.

Mayo Clinic staff (2008) 'Stress Management: Prevent Stress Setbacks', Mayo Clinic, http://www.mayoclinic.com/health/stress-management/sr00038.

Kendrew Lau Chu-man has developed various types of systems in his career, ranging from visualization and simulation applications to wireless telephone systems. He received his Bachelor of Engineering (Honors) and Master of Philosophy, both in Information Engineering, from the Chinese University of Hong Kong, and holds Java certifications of SCJP, SCWCD, SCBCD, SCDJWS, and SCSNI. He has taught Java programming and computing subjects at City University of Hong Kong and other universities, and operates a consulting business in system development. His current interest is in developing Android applications using various tools and technologies.

Coming soon