Skip to content

YuriiJavaDev/JavaBasics_Task_368_V0.1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Financial Reporting: Data Transformation (JavaBasics_Task_368_V0.1)

📖 Description

In financial systems, raw data must often undergo specific transformations and formatting before being presented to the user. This project demonstrates the Function<T, R> functional interface. We implement a formatting pipeline that doubles a numerical value and prepends a standard prefix. This illustrates the core functional concept of "mapping" — converting an input of one type (Integer) into a result of another type (String).

📋 Requirements Compliance

  • Standard Tooling: Utilized java.util.function.Function<Integer, String> for type-safe transformation.
  • Value Transformation: Implemented logic to double the input value ($x \times 2$).
  • String Concatenation: Integrated a fixed prefix "Result: " into the final output.
  • Clean Code: Followed naming conventions and structural templates required.

🚀 Architectural Stack

  • Java 8+ (Standard Functional Interfaces, Generics, Lambdas)

🏗️ Implementation Details

  • Function<Integer, String>: The contract that takes an Integer and returns a String.
  • ReportLauncherApp: The entry point providing the data and printing the formatted result.

📋 Expected result

Result: 14

💻 Code Example

Project Structure:

JavaBasics_Task_368/
├── src/
│   └── com/yurii/pavlenko/
│                 └── app/
│                     └── ReportLauncherApp.java
├── LICENSE
├── TASK.md
├── THEORY.md
└── README.md

Code

package com.yurii.pavlenko.app;

import java.util.function.Function;

public class ReportLauncherApp {

    public static void main(String[] args) {

        final String prefix = "Result: ";

        Function<Integer, String> reportFormatter = value -> {
            int doubled = value * 2;
            return prefix + doubled;
        };

        String finalRow = reportFormatter.apply(7);
        System.out.println(finalRow);
    }
}

⚖️ License

This project is licensed under the MIT License.

Copyright (c) 2026 Yurii Pavlenko

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files...

License: MIT

About

This is a tutorial project. JavaBasics_Task_368_V0.1 Financial Reporting Module: implementing a data transformation function using the standard Function interface and lambda expressions for automated formatting. 300426_0911

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages