We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [finance]

Finance is for anything related to currency, payment systems, credit card number validation, etc.

Filter by
Sorted by
Tagged with
54
votes
11answers
12k views

Sales tax calculator, rejected for being not OOP

I applied for an Application Developer position. They require all their applicants to complete 1 of 3 programming assignments. I picked one for sales tax calculation. It was quite simple. Write ...
25
votes
4answers
11k views

Validating Credit Card Numbers

This is one of the puzzles I was trying to solve, where the question is to validate the credit card number with following characteristics: It must contain exactly 16 digits. It must start ...
23
votes
7answers
5k views

Sales Tax Problem, rejected for not being up to their standards

I applied for a Junior .NET Developer Position recently, and I was asked to solve a problem (Sales Tax Program) and I was rejected for some reason. The question goes like this: Basic sales tax is ...
23
votes
3answers
2k views

Isn't this Interest-ing?

This is the fifth project in my CS1 class. It's a bit more drab than my past projects, so my titles are getting worse unfortunately. :( Write a program that ...
22
votes
3answers
4k views

Financial website scraper

I wrote the code that would scrap Finviz for tickers and href that attach to the ticker. I tested with multi-page as well as one page. I'm new to python programming and therefore believe my code is ...
19
votes
3answers
4k views

Credit card verification: string conversion most optimal?

Below is some code which verifies a credit card number using the checksum as well as check if number of digits are appropriate as well if digits start with right numbers. I am not sure if converting ...
18
votes
4answers
22k views

Operations to a bank account

I am a new .NET/C# developer and one issue bugs me ever since I've wrote code the first time. How can I improve this code? Program.cs: ...
18
votes
3answers
11k views

Credit card validator using Luhn's algorithm

I'm writing an algorithm to read from a file a list of numbers, and for each, determine if it is valid. If it is, then display which card type it is. ...
15
votes
8answers
4k views

Asking a user to take money from a checking account and move it to a savings account

I'm aiming to get this program right as I might show it at a job interview. The code below runs fine but I would like to know if there's anything that can be improved in terms of readability, good ...
15
votes
3answers
16k views

Basic Python OO bank account

I am learning Python and in particular learning about classes. Since I'm self teaching, I'd appreciate any feedback and constructive criticism. I have a couple specific questions: In Python you can ...
15
votes
4answers
6k views

Credit Calculator

The code has been test to work by the parameters listed below I just wanted to know if there were any details that I missed or blatantly overlooked. Develop a Java application that determines ...
14
votes
2answers
77k views

Introductory Currency Converter

This is my basic currency converter for my intro to Java class. I'm supposed to be able to convert between Yen, Dollars, Pounds and Euros using static rates. It works, but I was curious to know if I ...
13
votes
4answers
3k views

Heavily-criticized tax calculator

I just created this during a live screencast. The people who were on there were very critical of almost every line of code. They say I am a horrible coder and know nothing. Looking at this tax ...
13
votes
2answers
5k views

Sales, Taxes and Totals

I'm working to get some practice with SQL functions which are often used in a financial setting, and I created this simple table with products, prices and tax rates basically. I then wrote a query to ...
12
votes
5answers
5k views

Credit card validation

I started following Harvard's CS50 (Introduction to Computer Science) on edX, and as part of their Hacker edition set 1 was the following assignment: I am supposed to write a program (in C), that ...
12
votes
6answers
2k views

“Do you owe the government?” classes

Should my class pass parameters internally or reference class level scoped variables? I'm not sure on the best approach or style for procedure calls that have parameters. Should I go with the class ...
12
votes
3answers
26k views

Bank transaction system

I was hoping someone could provide some feedback with regards to this: ...
12
votes
4answers
5k views

Calculating totals of a transaction

I am working on a project where I have to calculate the totals of a transaction. Unfortunately, coupons have proven to be quite an issue. There are four types of coupons: transaction percentage, ...
12
votes
4answers
9k views

LW, MTD, STD, YTD Sales… all in line and looking pretty

That's Last Week, Month-to-Date, Season-to-Date, and Year-to-Date sales. I have a table-valued function for each one, that takes a date and returns all CalendarDate...
12
votes
2answers
319 views

Calculation of an inflation on volume/year

I would like to find out if my current solution to the problem described below is "good enough" or if there is an alternative way of achieving it. All I care about is the length (no. of lines) of the ...
11
votes
3answers
3k views

Bank card validation module

I hope that someone could review a module I wrote for bank card validation. I included a class that tests some of the methods, which is purely to show the methods work, rather than unit testing. ...
11
votes
2answers
305 views

Prorated refund calculator

I wrote this little piece of script for my workplace (insurance, etc.) to help our admins, as a light and simple file I can just email to my colleagues. The purpose of it is to calculate a prorated ...
10
votes
4answers
8k views

Payroll calculator

First I tried to fetch this program as close to pseudo code where I must follow all imported items, all method definitions, and all defined variables; anything else was my choice. After I created ...
10
votes
4answers
13k views

Simple budget program

I've decided to start working on a budget application for the purposes of enhancing my Python skills. In its current form this program takes given expenses and income and tells the user whether they ...
10
votes
3answers
2k views

Clean code attempt at ATM problem on codechef.com

The problem asks you to take an integer (debit amount) and a double (credit or initial balance amount) and process the requested debit verifying that 1 it's a multiple of the minimum denomimation ...
10
votes
2answers
68k views

Bank ATM program

I'm new to Java and have been reading Java for Dummies and other ones as well. I've started building this program like a week ago. I'm sure it's very messy. Just seeing if someone can clean it up and ...
10
votes
2answers
6k views

Design for a Java Banking program

UPDATE: Added concise problem summary and sample output log. I tried coding a sample Java program to solve a problem statement: Java Banking Demo Problem statement Complete code for Java Banking ...
9
votes
5answers
659 views

Prorated Refund Calculator (v2)

This is a follow-up question to original Prorated Refund Calculator. Here is the summary of the changes I made since last, thanks to the good answers and some study of my own. Did away with bleeding-...
8
votes
4answers
2k views

Selecting an enum for a payment transaction

I'm writing a small Android application that deals with payments and, in my function that handles transactions, I need to translate a number of installments (1-12) and whether or not it has interest (...
8
votes
5answers
1k views

Calculating the daily profit of a clinic

I need help with optimizing a piece of code I've written in C#, which is very sloppy right now. I needed to write code that tracks the amount of money a hospital has made at the end of the day, ...
8
votes
3answers
4k views

Basic mortgage calculator

I'm making a few forms of a mortgage calculator for my intro to computer science class. With inputs, I currently have it outputting the monthly payments. I'll eventually be outputting how long it will ...
8
votes
1answer
418 views

SalesTax problem (C# version)

One year ago I published an F# solution of the same task and there is an old C# solution. But I think it's a simple task and require a simple solution. What do you think? ...
8
votes
4answers
3k views

Convert an amount to Indian Notation

I need to convert an amount to an Indian currency format: ...
8
votes
2answers
143 views

Developing an investment strategy based on stock movements

Below is my code ...
8
votes
1answer
7k views

Validating a credit card

I recently created an extension which detects the type of credit card based on the numbers entered in and formats it. I am using Luhn Algorithm for validating credit card numbers and I am using jQuery ...
7
votes
3answers
4k views

Money class with overloaded operators

I have program that uses a Money class which has several constructors for different methods of input and overloaded operators to add, subtract, and compare values. ...
7
votes
3answers
541 views

ATM program with loan section

I have spent a few days coding an ATM. What I'm looking for is some critique of my work. Is there anything I can do better here? The entire project has 9 files and one class, a checking account and ...
7
votes
2answers
4k views

Banking application for practice

A few weeks ago I have started to teach myself C# and just finished my first little project, a very basic banking application. I don't expect it to be good but would like to get feedback (no matter ...
7
votes
3answers
1k views

Reversible tax calculator class

I have a class that contains 2 properties of the same type. decimal NetAmount and decimal GrossAmount I would like to ...
7
votes
3answers
6k views

Python Receipt Creator

My code takes input from the user and creates a receipt with the information the program receives from the user: ...
7
votes
2answers
1k views

Bank Management System

I'm new to C++ and wrote this Bank Management System app. It's one of the projects that everyone does as a beginner. This app runs perfectly so far. I tried to use OOP and encapsulation in this app. ...
7
votes
3answers
2k views

Design a Tips class that calculates the gratuity on a restaurant meal

Design a Tips class that calculates the gratuity on a restaurant meal. Its only class member variable, taxRate, should be set by a one-parameter constructor ...
7
votes
2answers
18k views

Bank account number validation in IBAN format

I wrote a JavaScript function for validating bank account numbers in IBAN format for my own joy. Could you have a look if you don't see any obvious mistakes or places for improvement? ...
7
votes
1answer
6k views

Hypothetical SalesTax challenge

I have a small solution to the following hypothetical problem: Basic sales tax is applicable at a rate of 10% on all goods, except books, food, and medical products that are exempt. Import duty ...
7
votes
3answers
6k views

Sales tax calculator

Please review the sales tax problem which has been designed using strategy pattern. The Problem: Basic sales tax is applicable at a rate of 10% on all goods, except books, food, and medical ...
7
votes
1answer
1k views

Calculate loan rate based on payment and duration in months

So I have the following code which works well-ish. Looking for ideas on how to improve it. ...
7
votes
1answer
691 views

Bank transaction implementation - side-effects of barriers

I'm interested in implementing role based code in C++. I'm also interested in what side effects or barriers (from static strong typing perhaps?) have been added that I am unaware of and if there is a ...
7
votes
1answer
87 views

A command-line application that manages my lending accounts

I'm learning Python and tried to solve a problem that I have. That problem is "managing" the people who owe me money. Basically, my project goal is: v0.1 - command line application v0.1.1 - command ...
7
votes
1answer
151 views

Thread-safe algorithm to make trades based on moving window of prices

Here is problem to be solved TradingAlgorithm employs a trading algorithm which, based on the prices it receives, will return a trade to execute. The trading algorithm must implement the ...
6
votes
4answers
6k views

Federal and state income tax calculator

I'm trying to optimize this code by: condensing repetitive statements Improving the code/make it less confusing Branch out to include other filing status such as "married" "joint" filing status ...