Skip to content

wreme44/Programing-Languages

Repository files navigation

Programming Language and Version

For this project, I selected C# (C Sharp), a modern, object-oriented, and type-safe programming language. The specific version used for this project is C# 9.0, which runs on the .NET 5 framework, providing a robust environment for developing console applications.

Why C#?

C# offers several advantages that make it ideal for a variety of programming tasks:

  • Type Safety: Reduces runtime errors by catching mistakes at compile time.
  • Versatility: Suitable for a range of applications from web to desktop to mobile.
  • Object-Oriented: Supports encapsulation, inheritance, and polymorphism, facilitating organized and reusable code.
  • Ease of Use: C# syntax is intuitive for those familiar with C-based languages, making it accessible to a broad range of developers.
  • Rich Library Support: .NET Framework and .NET Core provide extensive libraries that simplify complex tasks and enhance productivity.

Language Features and Project Relevance

C# effectively supports:

  • Object-Oriented Programming: Allowing for a structured approach to building reusable code and maintaining projects efficiently.
  • File Ingestion: Utilizes libraries such as CsvHelper to handle CSV file operations seamlessly, which is crucial for data-driven applications.
  • Control Structures: Includes conditional statements, loops, and error handling, which are essential for handling the flow of a data processing application.
  • Subprograms (Methods/Functions): Supports clean code practices by encapsulating functionality into methods that can be called as needed.
  • Unit Testing: Supported via frameworks like NUnit or xUnit, facilitating test-driven development (TDD).
  • Exception Handling: Robust exception handling with try, catch, finally blocks ensures the application handles errors gracefully and maintains reliability even with unexpected input data.

Libraries Used

  1. CsvHelper: A library that provides easy data parsing from CSV files into C# objects. Chosen for its simplicity and performance in handling data import.
  2. System.Linq: Offers powerful data manipulation capabilities directly in C#. It simplifies complex queries on data, such as filtering and aggregating, without the need for verbose loops and conditional logic.
  3. System.Text.RegularExpressions: Utilized for parsing fields that require validation or complex string manipulations, ensuring data integrity and format correctness.

Assignment Questions - Outcomes and Screenshots

1. Company with the highest average weight of the phone body: - OEM: Lenovo Answers Screenshot

2. Phones announced in one year and released in another: - Models and OEMs: - Motorola One Hyper - Motorola Razr 2019 - Xiaomi Redmi K30 5G - Xiaomi Mi Mix Alpha Answers Screenshot

3. Number of phones with only one feature sensor: - Count: 432 Answers Screenshot

4. Year with the most phones launched post-1999: - Year: 2019 Screenshot showing all answers: Answers Screenshot

These results demonstrate the application’s capability to process and analyze CSV data effectively, providing insights into the dataset based on specific queries related to the mobile industry. Each output is backed by a screenshot for visual verification of the application performance.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages