Introduction to Programming

Objectives

Knowledge

Understand the programming constructs included in the Java language fragment covered in the course.

Know the components and basic tools of a software development environment (editor, compiler, etc) and their role.

Application

Read and explain / mentally simulate the functionality of code fragments written in the Java programming language.

Design and implement correctly simple algorithms.

Build a small application, using the covered Java language fragment and the methodology defined in this course.

Develop well-organized small-sized programs, following a given set of standards.

Correctly use, to the expected level, programming tools and interpret their results (error messages, etc).

Do as a team a small programming project, using the skills acquired in the course.

Soft-Skills

Develop disciplined work and deadline meeting skills.

Develop a concern with rigour and the execution of work plans, following previously defined methods.

Develop team work skills.

General characterization

Code

10637

Credits

9.0

Responsible teacher

Carla Maria Gonçalves Ferreira

Hours

Weekly - 5

Total - 77

Teaching language

Português

Prerequisites

None

Bibliography

Cay Horstmann, Core Java, Volume I: Fundamentals (Oracle Press for Java) 13th Edition, 2024.

David J. Eck, Introduction to Programming Using Java, 9th edition, Online book, http://math.hws.edu/javanotes, 2022.

Walter Savitch, Java: An Introduction to Problem Solving and Programming, 8th edition, Pearson, 2018.

Java 21 (API): https://docs.oracle.com/javase/21/docs/api/

Teaching method

Teaching consists of lectures and labs. The lectures present material illustrated with examples and supported by slides.

In the practicals, students solve consolidation exercises to practice with the concepts learned and used in the lectures.

In the programming project, which is delivered in two phases, students develop a simple application, enabling them to apply the material learnt in class. The project will also help students assess their understanding and encourage further learning. Some practicals are dedicated to project support, allowing the teaching staff to address the student''s difficulties and provide support for better code organisation and quality.

Evaluation method

Assessment Components

Assessment has two components: the laboratory component and the theoretical component. All assessment elements are graded between 0 and 20 points.

Laboratory Component

The laboratory component comprises two programming projects. These two assignments will be delivered on the Mooshak platform. Mooshak is considered to accept a program if the program produces the correct results with the tests performed.

The first programming project is developed individually and the second programming project is done in teams of two students. Discussions (to assess each student''s understanding of the delivered programming projects) are mandatory, in person, and individual. The discussion of a programming project consists in making changes to the delivered code so that the new program solves a variant of the original problem, defined in the discussion statement, which differs very slightly from the problem solved in the programming project. Discussion grades and their criteria are the following:

  • 20: the change is generally correct;
  • 16: the change is confusing or very incomplete, but the direction taken is not wrong;
  • 12: the change is not correct, with "some things done well and others very poorly";
  • 4: no change was made, or the changes made are minor (e.g., only changing the input reading), or the changes made do not make sense.

In general, the student''s grade in a programming project is the minimum between the grade of the delivered programming project and their grade in the discussion of that programming project (which is zero if the student was absent).

The project grade (Pgrade) is the weighted mean of the student''s grades in the two projects (P1 e P2):

Pgrade = (0.1 P1 + 0.2P2) / 0.3 .

In order to succeed (and to have access to the exam), it is required that Pgrade >= 9.5 (out of 20).

Theoretical Component

The theoretical component comprises two tests. If the weighted mean of the test grades is less than 9.5 and Pgrade >= 9.5, students can do a final exam. The tests and the exam are written, closed-book, and done individually in person. Electronic devices (e.g. calculators, mobile phones, tablets, smartwatches, and computers) are not allowed.

Pre-registration is required for the tests.

The theoretical-practical component grade (TComp) is the weighted mean of the test grades (T1 and T2) or the exam grade (Ex):

TComp = (0.3 T1 + 0.4 T2)/0.7 or TComp = Ex.

In order to succeed, it is required that TComp >= 9.5 (and Pgrade >= 9.5).

Final Grade

The final grade (F), defined only if Pgrade >= 9.5, is:

  • F = TComp, if TComp < 9.5;

  • F = 0.3 Pgrade + 0.7 TComp, if TComp >= 9.5 .

All grades (P1, P2, Pgrade, T1, T2, Ex, and TComp) are rounded to the nearest hundredth, except the final grade (F) which is rounded to the nearest whole number.

Attendance and Grades Obtained in 2023/24

Students who took the course in 2023/24 are exempt from completing the assessment elements of the laboratory component.

If they don''t hand in the first assignment, they automatically have an attendance and last year''s assignment grade (gradeP) will be used to calculate the final grade.

If they choose to hand in the first assignment, the assignment grade (gradeP) is calculated on the basis of the assessment elements handed in this semester, and they may not get an attendance.

Students who took the course before 2023/24 must complete the work in order to take the course this semester, ignoring all previous marks.

Grade improvement for students approved in 2023/24

According to the FCT NOVA Knowledge Assessment Regulation, the final grade of students who passed in 2023/24 and take the grade improvement exam in 2024/25 is calculated using the 2023/24 rules. Therefore, in these cases, the final grade is:

F = Ex, if Ex < 9.5;
F = 0.25 gradeP + gradeE + gradeD + 0.65 Ex, if Ex >= 9.5 ,

where Ex is the grade for the exam taken in 2024/25 and gradeP, gradeE and gradeD are the grades for the laboratory component obtained in 2023/24.

Fraud and Plagiarism

Issues of fraud and plagiarism will be dealt with in accordance with the FCT NOVA Knowledge Assessment Regulation.

Students are allowed to talk to their colleagues about the programming projects and discuss solutions, but they are prohibited from sharing code (even only "a few lines") under any circumstances, whether orally or in writing. Writing code must be an internal task within each team. For example, displaying code on the screen, dictating code, sending files with code, or placing them on sites accessible to third parties is not permitted. It is considered that:

  • a team that gives or receives code is committing fraud;
  • a team in which only one member is working is committing fraud;
  • students who collaborate in larger groups, sharing code, are committing fraud.

The use of AI tools (such as ChatGPT or Copilot) must be explicitly mentioned in the code. A team that uses these tools while carrying out a programming project and omits their usage is considered to be committing plagiarism.

Subject matter

1. Computers and programs

2. Basic data types

3. State manipulation

4. Decision constructs

5. User interaction (I/O)

6. Loops and introduction to recursion

7. Vectors and related algorithms

8. Sorting and searching

9. Classes and objects

10. Structure of an application

11. Iterators

12. File manipulation

13. Matrices

14. Applications with several classes

15. Basic software development principles

Programs

Programs where the course is taught: