From fae5c7773e3318279fe7b2fbb085db495075b566 Mon Sep 17 00:00:00 2001 From: Andrei Jiroh Halili Date: Sat, 4 Oct 2025 14:39:38 +0000 Subject: [PATCH] chore: update docs + code the hell up for 04 Lab Exercise 2 also update the lockfiles for devenv btw Signed-off-by: Andrei Jiroh Halili --- README.md | 10 ++++-- devenv.lock | 8 ++--- devenv.nix | 6 +++- .../projects/variableNamingConventions.java | 34 +++++++++++++++++++ 4 files changed, 51 insertions(+), 7 deletions(-) create mode 100644 java/src/dev/andreijiroh/studentops/projects/variableNamingConventions.java diff --git a/README.md b/README.md index 8781c36..b3d0992 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,13 @@ # Codelabs for Programming/CS Projects in College -This repository contains the coding outputs for different computer programming course subjects -in college, a la CS50(x). +This repository contains the coding outputs for different computer programming +course subjects in college, a la CS50(x). + +## Setting up + +### With Nix + +Make sure Nix and `direnv` are installed on your machine ## Code mirrors diff --git a/devenv.lock b/devenv.lock index 2bc0bd4..621e4bf 100644 --- a/devenv.lock +++ b/devenv.lock @@ -3,10 +3,10 @@ "devenv": { "locked": { "dir": "src/modules", - "lastModified": 1759437797, + "lastModified": 1759527603, "owner": "cachix", "repo": "devenv", - "rev": "89ce1b7ac66ca381a335a60ad6acc723ef6f42f3", + "rev": "ce82fad570fd74ac5dfe3ce587ee8b37e918d71f", "type": "github" }, "original": { @@ -40,10 +40,10 @@ ] }, "locked": { - "lastModified": 1758108966, + "lastModified": 1759523803, "owner": "cachix", "repo": "git-hooks.nix", - "rev": "54df955a695a84cd47d4a43e08e1feaf90b1fd9b", + "rev": "cfc9f7bb163ad8542029d303e599c0f7eee09835", "type": "github" }, "original": { diff --git a/devenv.nix b/devenv.nix index 7c7f763..83b1b95 100644 --- a/devenv.nix +++ b/devenv.nix @@ -5,7 +5,11 @@ env.GREET = "devenv"; # https://devenv.sh/packages/ - packages = [ pkgs.git ]; + packages = with pkgs; [ + gitFull + gh + glab + ]; # https://devenv.sh/languages/ languages.java = { diff --git a/java/src/dev/andreijiroh/studentops/projects/variableNamingConventions.java b/java/src/dev/andreijiroh/studentops/projects/variableNamingConventions.java new file mode 100644 index 0000000..8ad7c92 --- /dev/null +++ b/java/src/dev/andreijiroh/studentops/projects/variableNamingConventions.java @@ -0,0 +1,34 @@ +package dev.andreijiroh.studentops.projects; + +/** + * Computer Programming 1 - 04 Performance Task + * @author Andrei Jiroh Eugenio Halili (STI College Meycauayan) + */ +public class variableNamingConventions { + public static void(String[] args) { + // Set A + int age = 24; // age + double height = 1.75 // in meters + String legalName = "Juan Luna IV"; // full name + char gender = 'M' // gender + boolean isStudent = true; // confirming if the person is a student + + // Set B but fixed + int subjects = 6; // number of subjects + double weight = 70.5 // weight in kg + String birth_place = "Ilocos Norte"; // birthplace + char blood_type = 'O'; // blood type + boolean has_pets = true; // confirming if the person has pets + + // Set C + System.out.println("Name: "+legalName); + System.out.println("Height: "+height); + System.out.println("Gender: "+gender); + System.out.println("Is Student: "+isStudent); + System.out.println("Number of Subjects: "+subjects); + System.out.println("Weight: "+weight+" kg"); + System.out.println("City: "+birth_place); + System.out.println("Blood type: "+blood_type); + System.out.println("Has pets?: "+has_pets); + } +} \ No newline at end of file -- 2.51.2