Reza Golkhandani

Backend Developer | Full Stack Developer | Instructor | Explorer

Reza Golkhandani

Programming Summative Assessment

Course: Information Technology

Title: Computer Programming

Grade: 12

Topic: Arrays, Files, and Searching

Designed by: Mohammadreza Rahimiangolkhandani (1301459)

Institution: New York Institute of Technology (NYIT)

Professor: Dr. Darren Francis

Date: 2022 - 07 - 02

https://golkhandani.academichosting.ca

“Be the one you love, do what you love.”

Rationale Guiding Questions

  1. What is the purpose of your assessment?
    • Analyze the knowledge and proficiency of the student in working with arrays, files, and search functions.
    • Analyze students’ ability to identify problems and come up with efficient solutions.
  2. Identify the content (goals/outcomes) to be assessed:
    • Problem-solving using arrays, search, and file handling
    • Efficiency in solutions
    • Familiarity with array techniques and concepts
  3. Design considerations:
    • Rubrics describing ideal performance
    • Creative freedom in solution methods
    • Clear parameters (length, grading, date, etc.)
  4. Procedures and Responsibilities:
    • Teachers: Tag questions by objectives, blind grading, timely feedback
    • Students: Study via feedback, avoid sharing answers
  5. Supporting student learning:
    • Motivates study
    • Reveals learning gaps

Assessment Instructions

Part 1: Definitions and Concepts

  1. Define:
    • Space complexity
    • Time complexity
  2. Difference between Map, Set, and List

Part 2: Application

Story: Coffee machine storing customer order data (name, date, price)

Part 3: Code Analysis


                fun combinationSum3(k: Int, n: Int): List> {
                val result = mutableSetOf>()
                fun dfs(i: Int, current: List, sum: Int) {
                    if (sum == n) {
                        if (current.size == k){
                            result.add(current)
                        }
                    }
                    for (j in i..9) {
                        if (sum + j > n) break
                        dfs(j + 1, current + j, sum + j)
                    }
                }
                dfs(1, emptyList(), 0)
                return result.toList()
            }
  1. Calculate time and space complexity
  2. Rewrite with better time complexity
  3. Rewrite with better space complexity

References

Download original file