N@TM Blog

  • I can’t believe how much I’ve learned and grown in my understanding of Java this trimester. When I first started, I didn’t even know the difference between Java and JavaScript. But now, I can (somewhat) confidently read and read the language. It’s amazing how similar it is to the pseudocode used in last year’s AP Computer Science Principles exam, which I am familiar with. By pushing myself to work on the backend and use Java more, I have gained a much deeper understanding of the language. Our project this trimester allowed me to practice my Java skills individually and I feel that continuing to challenge myself in the next two trimesters will prepare me well for the AP Exam and potentially help me achieve a top score of 5.

  • N@TM offers a diverse range of classes that cater to different interests and skillsets. Among these classes, 3D Animation stands out as a fascinating and visually engaging subject. The art forms showcased in this class were incredibly varied, ranging from realistic depictions to abstract representations, and even a combination of both. Exploring the endless possibilities of 3D animation was an enriching experience, and I found myself fascinated by the intricate details that went into creating each piece.

  • Another class that I found myself thoroughly immersed in was Visual Arts. It was undoubtedly the class where I spent the most time, aside from Computer Science. The artwork showcased here was truly impressive, and I was awed by the creativity and talent of the artists. This section inspired me to be more thoughtful and deliberate in my own work, as I saw firsthand how attention to detail and a creative mindset could produce stunning results.

  • Of course, I couldn’t forget the incredible computer science projects that other students had created. DADY Accademy was one of my personal favorites, as it presented random computer science questions for the user to solve. The project was polished and well-executed, with custom animations and the ability to create an account. It was evident that a lot of hard work and dedication went into creating these projects, and I was inspired to approach my own work with the same level of care and precision. Overall, N@TM provided a rich learning experience, with a diverse range of classes and projects that catered to various interests and skillsets.

How others graded us ~

Extra Credit 1 Extra Credit 2 Extra Credit 3

Individual and Team Trimester Review

Video Demo

Our project

  • Our project is based off of Saturn, a school planning site that allows students to plan their day at school but is limited to these features
    1. Class schedule
    2. Class chat
    3. School events
  • We wanted to achieve something similar to Saturn but cater to activities and lives after/outside school. Some of the features we have are
    1. Class schedule
    2. School announcments
    3. General event creator
    4. Weather application
    5. User login
    6. Other small ammenities

Problems

  • We experienced a series of problems especially because we were trying to achieve a lot. This involved creating databasess and api controllers as well as using external apis. We also ran into issues such as frontend aspects of things such as trying to achieve a clothing simulation where you could simulate yourself wearing clothes based on the weather outside. I myself faced a lot of problems with user.

  • My Major Problems

    1. I spent a significant amount of time investigating the JWT error, only to discover that it wasn’t crucial to the overall issue. Moving forward, I will exercise greater caution by carefully reading the error message and adopting a more focused approach to problem-solving, rather than solely searching for any code-related connections to the error. Moreover, I will overcome any hesitation and seek assistance when faced with challenges like this.
    2. POST Request error: I had not yet fully looked at Person.java, PersonJpaRepository.java, PersonApiController.java, or the spring security files which led me to taking an excruciating amount of time understanding and finally being able to get a read and post requests. This also led to me getting errors with jwt which I was able to figure out
    3. CORs error: This was the error that I got stuck on for the longest. After researching it, CORs is a security protocol to protect users from cyberattacks. I eventually figured out I had to configure CORs inside the security file in spring. (Colin and Soham helped me figure this out because they were interacting with systems similar to Person.java and spring security)

My Final Contributions

  • Login/Signup page and succesful backend connectivity
    • Users can create and sign into an account. Announcments and events are saved for each user
  • Announcments database
    • Saves the announcments from all users
  • Backend initial setup
    • Set up the backend and made it work
  • Security Changes
    • Fixed issues revolving around cors and signup

Help with CORS and Announcments

  • Gets the existing announcements from the database using a GET Request
  • Allows you to add to the database by using a POST Request
  • Not to go through the entire parts of the Announcment.java and AnnouncmentApiController.java files, ive provided the main parts of each one

// Announcement.java
public class Announcement {
    private String text;
    private String timestamp;

    public Announcement(String text, String timestamp) {
        this.text = text;
        this.timestamp = timestamp;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(String timestamp) {
        this.timestamp = timestamp;
    }
}

// AnnouncementApiController.java
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/announcements")
public class AnnouncementApiController {

    @GetMapping
    public List<Announcement> getAnnouncements() { //fetch
    }

    @PostMapping
    public Announcement postAnnouncement(@RequestBody Announcement announcement) { //post
    }
}

Explanation

  • The Announcement.java file is a simple Java class that represents an announcement. It has two properties: text and timestamp. The text property is a string that holds the text of the announcement, and the timestamp property is a string that holds the timestamp of when the announcement was made. This class also has getter and setter methods for these properties.

  • The AnnouncementApiController.java file is a controller class in a Spring application. It uses the @RestController and @RequestMapping annotations to indicate that it’s a RESTful controller and that it should handle requests at the “/announcements” path.

  • The getAnnouncements() method is annotated with @GetMapping, which means it handles HTTP GET requests at the “/announcements” path. This method should fetch a list of announcements from your data source and return them.

  • The postAnnouncement(@RequestBody Announcement announcement) method is annotated with @PostMapping, which means it handles HTTP POST requests at the “/announcements” path. This method should save a new announcement to your data source and return it. The @RequestBody annotation indicates that the method parameter should be bound to the body of the incoming HTTP request.

Commits

  • My Commits (frontend)
  • My Commits (backend)

I created my LinkedIn which is also found at the bottom of my page (I was planning to do this ages ago but never got to it)

MCQ review and student teaching

23

  • The reason I missed this is related to the way I’m adding elements to the ArrayList. Instead of inserting elements at a specific index (animals.size() - k), I’m adding them to the end of the list using the add method. This would result in a different order of elements compared to the desired outcome. To fix this, you should use the add method with the appropriate index to insert elements at the desired position in the ArrayList. The correct statement in the for loop would be animals.add(animals.size() - k, words.get(i)). It’s important to pay attention to the specific requirements and instructions of the problem you are solving to ensure that you use the correct methods and follow the desired logic. Correct answer B [“bear”, “zebra”, “bass”, “cat”, “koala”, “baboon”]

    25

  • The reason I partially missed this is because I invalidated the first answer as soon as I got the second answer and found that it works. I originally found that the first one works but checked the second one and that one also worked. I dont know the process that happened in my mind but I made the choice of B rather than D (I was probably tired and didnt see it or thought it said something different). The correct answer is D which would be both methods

    26

  • The reason I missed this is because the loop control variable k is initialized with a value of 1 and increments by 1 until k is equal to arr.length. This means that the loop will start at index 1 and go up to the last index (arr.length - 1). However, since array indices start at 0 in Java, the element at index 0 (arr[0]) will be skipped and not processed by the loop. This could potentially lead to incorrect results if the first element in the array needs to be considered. To fix this, you should initialize the loop control variable k with a value of 0, and increment it until k is less than arr.length. This way, all elements in the array will be processed by the loop, including the element at index 0. The correct answer was A

Student lesson grades

Lesson Grade
Unit 1 0.9/1
Unit 2 0.91/1
Unit 3 0.95/1
Unit 4 0.95/1
Unit 5 0.8/1
Unit 6 0.91/1
Unit 7 0.95/1
Unit 8 0.85/1
Unit 9 1000000/1
Unit 10 0.79/1
  • Total: 8.02/9
  • Grade: 8.95/10