Visual C++ :: Keep Track Of Social Security Numbers (SSN) Of Customers Of Bank
Jun 26, 2013
I am trying to write a program that keeps track of social security numbers (SSN) of customers of a bank. I have to assume that SSN is a four-digit number (e.g., 1234. 0123 is not allowed.). When the program runs,it has to prompt that the user should enter a 4-digit SSN number to record, or 0 (zero) to exit.
The program also needs to be able to give an error message if a certain number is entered more than once.
After all the numbers have been saved and you finally end it by pressing 0, it needs to be able to output all the entered SSN's.
Here is my code so far :
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
bool isExist(int ssn, int records[], int numberOfRecords);
void listRecords(int records[], int numberOfRecords);
int main()
In this assignment, you are going to write a program that keeps track of the social security numbers (SSN) of customers of a bank. Please notice that we are going to assume that SSN is a four-digit number (e.g., 1234. 0123 is not allowed.). When the program runs, it prompts that the user should enter a 4-digit SSN number to record, or 0 (zero) to exit.
So far I have this:
#include <iostream> using namespace std; bool isExist(int ssn, int records[], int numberOfRecords); int main(){ int ssn = 0; int records[32];
I am trying to write a program that keeps track of social security numbers of customers I have to assume that its a four-digit number. When the program runs,it has to prompt that the user should enter a 4-digit number to record, or 0 to exit.
The program also needs to be able to give an error message if a certain number is entered more than once.
After all the numbers have been saved and you finally end it by pressing 0, it needs to be able to output all the entered SSN's.
Here is my code so far:
#include <iostream> #include <iomanip> #include <cmath> using namespace std; bool isExist(int ssn, int records[], int numberOfRecords);
My professor at college stated that it is important to always initialize a function type because if you don't it creates a security vulnerability. He said that it is better to initialize it as zero and then let the programmer/user manipulate that value later on.Why is this a security vulnerability within the program?Here was the example:
I'd like to make a control panel for different social media to control multiple account and have proxy support. I think i need to learn multithreading and socket programming right ?
I wrote the following code to divide 100 customers into three clusters but it kept on hanging during execution. I used while loop. Attached is the text file to use. and the code below :
//using bloodshed dev c++ compiler //How can I output the name and a two digit number next to it //example would be Indiana Jones 20 #include<iostream> #include<string> using namespace std; class Customer {
Create a line class using a linked list that acts as a queue (first in, first out) both enqueue and dequeue. Complete the line class so that customers can be added or removed from the line. Implement the line as a linked list of customer objects that you have developed yourself or use the vector class.
SYNOPSIS : KBJ tourist agency Sdn. Bhd wants you to write an application program to calculate the total price for their customers for a package of vacation. The following table shows the price for three destinations (transportation and accommodation) offered by the agency:
Destination TransportationAccommodation Pulau Redang Child RM15.00 Adult RM30.00RM95 per day Pulau Perhentian Child RM20.00 Adult RM30.00 RM100 per day Pulau Kapas Child RM10.00 Adult RM20.00 RM120 per day
This agency company will give some discount to a group of customers with is:
a.10% discount will be given for the group that has a least 5 adults.
b.25% discount will be given for the group that has more than 5 persons (adults and children)
c.30% discount will be given for the group that has at least 15 persons.
Your application program has to display the output using this following screen layout:
KBJ TOURIST CUSTOMER INFORMATION
Customer’s name: XXXXXXXXXXXXX Number of Children:XXXXX Number of Adult: XXXXX Transportation: RMXXX.XX Accommodation: RMXXX.XX Total price: RMXXXX.XX
This is the code i got so far but it doesn't work..:(
#include <iostream.h> int main () { char customerName,code,A,B,C; int childNum,adultNum; double rate,discount,totalPrice,a,c;
I have to create a small data base for a shop. One of the functions i am creating is taking a customers ID and scanning that through a text file and to print out the info about that customer. What i am having trouble with is where do i insert the string compare in my program?
//declaring array for input of customer ID int customer_ID [20]; printf("Please enter the customer ID:"); gets( customer_ID ); //users input stored in the array
I have an assignment to write a program using structures, getting input from a .txt file and output in text file as well. I have written a program that only reads and prints the data. I am trying to test if it works fine or not. I always comment an unnecessary code but still it wont compile. Now whats wrong with this program?
/* Bank Accounts Program */ #include <iostream> #include <string> #include <fstream> #include <cstdlib>//needed to use system() function using namespace std; const int MAX_NUM = 50; void menu();
I am creating a bank account using classes. I have created the classes and now implementing them in my main program. I haven't written anything in the withdraw, find acct and all functions except "read account: read_acct()" because i wanna test if it reading the data from my .txt file or not. Dont know whats wrong with the program its not executing. Would let know that i'm new to classes and objects. Following is the code:
This exercise should familiarise you with loops, if-then-else statements, and recursion. You will have to design and implement a program that calculates the interest earned on a bank-account. Deadline is the end of Tuesday in week 4.
Interests are compounded; that is, you earn interest on interest. Given a yearly interest rate of say, 6%, you can calculate the total sum available when an initial sum of 4000 pounds is put away for 13 years as follows:
4000 * ( (1 + [6/100])^13 ) = 8531.71 pounds
where the caret symbol denotes 'to the power of'. One way to calculate the power is by repeatedly mulitplying. Ie, you can mulitply 1.06 with 1.06 12 times to calculate 1.06^13.
PART 1
Design and implement a function that raises X to the power Y for a real number X and a positive integer Y. The function must use a while loop.
Design and implement a main program that calculates the sum availble when 1000 pounds has been put away for 25 years with 5 percent interest.
Change the while-loop in the function to a for-loop.
I am currently trying to read information from an ID3V1.1 tag in C. For this project we are not allowed to use any external libraries. All of the fields except for the track field read correctly. The last two lines are the ones giving me trouble. Whenever I run the program, I get a seg fault when it tries to get the track number. I tried to debug using gdb and it said the problem was happening on line 34 which is where the fseek is. It works for the other fields so I'm wondering why it is going wrong. Should I change the offset to something other than -128? But the whole tag is only 128 characters so I'm unsure what is going wrong.
Code:
Program received signal SIGSEGV, Segmentation fault.0x00000034ff66edf1 in fseek() from / lib64 / libc.so .6 Missing separate debuginfos, use:debuginfo - install glibc - 2.12 - 1.132.el6_5 .3.x86_64(gdb) back #0 0x00000034ff66edf1 in fseek () from /lib64/libc.so.6 #1 0x000000000040076f in main (argc=1, argv=0x7fffffffdf58) at id3tagEd.c:34 Code: Code: #include<stdio.h> #include<string.h> }
i am trying to make a hangman game. The game works fine so far but i cannot seem to keep track of the letters used. I have to prevent the user from using a letter that has already been entered by the user at some point in the game before. But can't seem to work my way around it. I have included the code below
i am currently doing a mini bank account system using visual studio...i need using the header files...the question requires to use 3 header files for each class.these are the classes:
a)Accounts b)CurrentAccounts c)SavingAccounts
i have done the first part... how to do a new class in a different header file..
Anyhow, I have a program due Wednesday that is along the lines of the classic Bank Teller simulation using Queue's.
Unlike most of these programs, I have to integrate my own Queue, QueueNode, Teller, and Customer classes. I have attached all of these headers below plus the main file.
Now the error: While I'm sure there are other issues with the code, it will not let me create a new customerQueue (of Queue type) object as such:
Queue<Customer> customerQueue;
The error it is giving me is:
no matching constructor for initialization of 'Queue<Customer>'
I have an odd compiling error. My base class is all delcared and read to go. But I could not figure out how to get my sub classes inherit from it. So I had to make everything public. Even inheriting using the protected inheritance thingy, still could not get them to inherit from that base class.
So I compiled the program, and no other class came back with an error. only my base class. Here is the base class:
#include <iostream> #include <string> using namespace std; class Bankaccount {
[Code] .....
The error I'm getting is saying:
error C2143: syntax error : missing ';' before 'using' Where is there anything needing a semicolon before using?
'Bankaccount' : 'class' type redefinition see declaration of 'Bankaccount'
Is it saying this because I don't have any private class members?
'Bankaccount' : base class undefined
But it is defined.
What is the issue with this class? And how can I get it to compile and run?
Following function is from a bank account, when new account is created it won't store it in the array or i guess it does but find_acct function wont be able to find it.
find_acct Function:
int findacct(int acctnum_array[], int num_accts, int requested_account) { for (int index = 0; index < num_accts; index++) if (acctnum_array[index] == requested_account) return index; return -1;
I am trying to pull my words randonly from a wordbank .txt file and so far i have this
#include <iostream> #include <cctype> #include <fstream> using namespace std; string word; char knownLetters[]; // The word could be of any length int stages = 6; // Our hangman has 6 stages, so the player starts with 6 lives
I am trying to figure out the best way to approach a part of a project I am working on for school. I need to put in a 6 digit account number that will not allow duplicates for another user. How to approach this .
does a pointer keep track of time stamps when it is created? i am trying to use it to create a table that can store the access count and the temporal locality at the same time.
I would like to track user actions within my windows desktop application, and write them to a database.
I also have a User class, that has a userID field pulled from the User table. I can write a login event (UserID, timestamp, action) with no problem, but as the user navigates around the app, how can I persist the user object so I always have access to their userID? I know I can just pass it as a parameter as they do different tasks, but that seems inefficient to me.