My name is Osman Zakir. Email address firstname.lastname@example.org. I also have a Gmail account, and the email address for that one is email@example.com.
I'm also between beginner and intermediate and in need of coding friends. A mentor would also be good. I'm reading the book Programming: Principles and Practice Using C++ 2nd Edition by Bjarne Stroustrup, but I think I could use some actual mentoring which is why I'm asking for that.
I took an intro CS course edx.org, Introduction to Computer Science (CS50), given by Harvard. I need to do the Final Project for that course now, for which I'm planning to use the C++ Wt library to create a web app.
For the web app itself, I was thinking of using an exercise I'd done for the book I'm reading as a base. It's a currency convertor, but I have to manually update the conversion rates myself. I wanted to create a web application that would take the conversion rates from the web in real time. And for the user interface, I was thinking of using the Google Maps API. What I have in mind is that the app would take the user's geolocation to show them where they are on the map, as well as their own currency converted to any other currency of their own choosing.
The currency convertor app I'm thinking of using as a base takes in a currency as user input and converts it to USD. I wanted to specialize it a little more and make it more flexible, such that if the user is in the US, they could look at how much a US Dollar is worth in other countries for example, or if they're outside the US, they could check how much their own currency is worth in the US or in any other country. And of course, the original app is just a console app. For reference, here's the code for the aforementioned base/original app (note: conversion rates haven't been updated since I last wrote the code):
// Osman Zakir
// 12 / 5 / 2016
// Bjarne Stroustrup: Programming: Principles and Practice Using C++ 2nd Edition
// Chapter 4 Section 18.104.22.168 Try This Exercise
// This program converts from Yen, Euros, Yuan, Kroner, or Pounds to Dollars
double convert(const char unit, const double amount);
bool check_input(const char unit);
cout << "Please enter a money amount followed by currency (y(en), e(uro), p(ound),\n"
<< "(k)roner, or Y(uan) (must be an uppercase Y, to make sure to not clash with"
<< "lowercase y for y(en)):\n";
double amount = 0;
char unit = ' ';
cin >> amount >> unit;
cout << "Sorry, I don't know a unit called '" << unit << "'\n";
double dollars = convert(unit, amount);
cout << "Your money converted to US Dollars is $" << dollars << ".\n";
double convert(const char unit, const double amount)
constexpr double yen_to_dollar = 114.239139;
constexpr double euro_to_dollar = 0.927889;
constexpr double pound_to_dollar = 0.785687;
constexpr double yuan_to_dollar = 0.143708;
constexpr double krone_to_dollar = 0.140471;
double dollars = 0;
dollars = amount / yen_to_dollar;
dollars = amount / euro_to_dollar;
dollars = amount / pound_to_dollar;
dollars = amount * yuan_to_dollar;
dollars = amount * krone_to_dollar;
bool check_input(const char unit)
if (unit == 'y' || unit == 'e' || unit == 'p' || unit == 'Y' || unit == 'k')
If there's anyone on here or in the group who could help me learn Wt, that would also be a great help. I'm also reading up stuff on the Wt website, but I could use the experience from writing some code myself using Wt.