Name app.

Hello guys, this my assignment. I find it really hard for a beginner like me. would appreciate if you could give me a hand.

Here is what is required:


INPUT: you need to give mother’s name and father’s name and the gender of the newborn.
OUTPUT: 3 names for the newborn of appropriate gender. Here we will be strict in defining that the names of girls must end with A, E, I… and we will exclude names like NIKOLA, MUSTAFA,...

The three names are obtained as follows.
The first name is obtained by taking at least two first letters of the mother’s or father’s name appended by at least two first (or last) letters of the other parent.
E.g. Father’s name: LIBURN, Mother’s name: ARDELA you can output
LIARD for a boy, or LIBELA for a baby girl
E.g. FLAMUR and URATA would yield FLAURA for a girl and FLURAT for a boy
Take at least two last letters of the mother’s (or father’s) name and at least two first or last letters of the other parent.
E.g. Father’s name: Liburn, mother’s name: Ardela
URNELA for a girl and URNAR for a boy.
E.g. FLAMUR and URATA would yield: MURAT and URATA
Append the names of the parents in one string. Take random letters from left to right.
Example.
Mother’s name: FLOGERTA, father’s name: MARTIN
Possible output for baby boys: GERTAR, GERTIN, FLOTIN
Possible output for baby girls: GEMA, ERTA, FERTAMA
4) You can always add a vowel or a consonant at the end of the proposed name to set the gender right.
Show us what you have so far
I Dont know where to start.
Well, you need to get input from the user, I might start with that. Then create functions to scramble the parent names according to the rules for each name variation. Can you use the <string> library or are you restricted to character arrays?
Yes you can use string.
I've always found this to be the best place to start just to make sure everything is working:

1
2
3
4
5
6
7
8
9
10
11
#include<iostream>

using namespace std;

int main(void) {

  cout << "Hello World" << endl;

  return 0;

}
Then after that, you add comments like pseudo code to get your thoughts down.

// Get Father's name
// Get Mother's name
// Get kids name

// store these in a sting like string *Father;
Topic archived. No new replies allowed.