C++ :: Program To Maintain Database - Name And Birthday
Oct 16, 2014
Write a program that maintains a database containing data, such as name and birthday, about your friends and relatives. You should be able to enter, remove, modify, or search this data. Initially, you can assume that the names are unique. The program should be able to save the data in a fi le for use later.
Design a class to represent the database and another class to represent the people. Use a binary search tree of people as a data member of the database class. You can enhance this problem by adding an operation that lists everyone who satisfies a given criterion.
For example, you could list people born in a given month. You should also be able to list everyone in the database.
I am a beginner trying to write a program that would state a user's chinese zodiac and horoscope sign after inputing his or her birthday. I have been, however, having trouble getting the program to run correctly.
You are required to write a program for a Used Car Dealer company. In the system you need to maintain the cars’ inventory and details. Each car in the company contains the following details:
• Car Registration Number • Car Make or Brand • Car Model • Car Colour (eg. Silver, Black , Red) • Year of manufacturing (The year the car was manufacture) • Engine Capacity (in cc) • Transmission (manual or automatic) • Cost of the car (SGD)
The Car Registration Number is in the format of AAA1234 or AA1234A or A1234A which is accordance to the Malaysia car registration format. The A alphabet is in accordance to the registration number for respective in Singapore. (eg. AEW9829 or W1212Y or MCD1177). Note the A and the 1234 total count in the registration number can be less than 3 like AT9829 or BHY280. The Car Make is for the identifying the manufacturer of the car like Honda, Toyota, Proton..etc. The Car Model is to represent the Manufacturers’ respective model like Honda City, Honda Civic, Honda Accord, Toyota Vios, Toyota Camry … etc.
You are required to create menu and operations for:
1) Create a new Car account 2) Edit existing Car account details 3) Remove a car account from the system 4) Search for cars in the system (based on Car Make, Model, Year of manufacturing or Price) 5) Check total inventory in the system
I'm trying to sort by age a vector of birthday dates. I'm using the functions in the <ctime> header to calculate the difference in seconds between two date but it doesn't work! If I try to print 2 different dates with asctime() or ctime() it either prints 2 time the same date or throws an exception! I post my code below: p.s.: I'm using a wrapper class called Date.
I have to write a c++ program with my own function which consists of two parameters (day, month). Function have to return number of days since the begining of this year. Using this function i have to find out how many days are left till birthday (or how many days have passed since last birthday)
This is how far i am:
Code:
#include <iostream> using namespace std; int cikDienu(int diena, int menesis); int main()
I want to maintain a list. which will update at regular interval. so I thought to with linked list. Earlier I have used linked list.
Code:
typedef struct { short nwkaddr; unsigned char macaddress[8]; }device_t; }
[code]....
This program is giving many errors. I tried lot to fix it. If I fix one then other bug is arising. for that I did't mentioned what bug i got.Main Issue is while (curr->next->list != NULL) this is giving segmentation fault if i add element second time
I have an extra credit project where I'm supposed to calculate an approximate the user's age based on the current date and their birthday. My problem is that I am not getting the proper date and time. C++ keeps giving me some random date. I looked up c++ time format on the internet because this is extra credit and not in my book.
I am currently using dev C++ 4.9.9.2. Here is my current code :
// included libraries #include <cstdlib> #include <iostream> #include <iomanip> #include <time.h> #define cls system("cls") #define pauseOutput system("pause") void printM(int x); void age(int m, int d, int y, int &yearAge, int &monthAge, int &dayAge);
In the existing code,fork has call parallel to create process.my job is to store all the process id into vector so that we can verify the status of the jobs. I was able to save all the jobs but as the callback happen so I have lost my all value which was store into vector.
How can i maintain variable between multiple process.
I wrote this menu-driven program that maintains a list of restaurants. The program runs fine as it is right now, but my problem is I need to create a new array template class to maintain the list of restaurants, and when a new restaurant is added it must be created dynamically.
I'm having a hard time figuring out what exactly I need to do for this. Templates confuse me allot and I've read all the sections on templates here and in my book, but i'm still lost. The dynamic memory part is throwing me off as well.
The problem is that I need to figure out the user's birthday in months, days, hours, and minutes from today's date.
Here's what I have so far.
#include<iostream> #include<cmath> #include<ctime> using namespace std; int main() { int todayDay, todayMonth, todayYear; int birthDay, birthMonth, birthYear;
[Code] ....
I haven't initialized all the variables, yet. And it's very unfinished. I need to figure out how to convert years from the age into months only. And I need to figure out how to calculate the hours, seconds, and minutes.
I'm about to begin work on an exercise that requires me to maintain a list of the variables inside a c source file. I'm trying to figure out how I'm going to pluck out the variable names from all the other noise. My first thought would be to count any word that isn't a keyword or other type of grammar syntax, such as parenthesis, brackets, semicolons, etc. right?
Assignment on Linked List : Write a program that maintains student academic records using a linked list. The data structure is to be implemented as an array of structures. The fields of the structure are as follows:
• Student ID - this should be unique
• Last name
• First name
• Middle initial
• Course
• QPA
• Address
The program shall be menu driven. This means that the actions that the user can do with the program is govern by choosing an option. The menu shall look like this:
Student Records
1. Add student Academic Record
2. Edit student first name
3. Delete student record
4. View student record (by last name)
5. View all student records
6. Exit
For the edit and delete, the search value should be the student ID. What's lacking on my codes is for the 3rd option. What should I must do with it? These are my codes
I am studying Software Engineer and i have a project on C. The project is a simple Pharmacy Management. I know how to develop it also i have already created the DataBase but i don't know how to connect it.
I am building a semi-complicated program and the focus of it will be on the search engine. The current plan is for it to search an online database after keywords and receive a list of responses organized by relevance.
I want to minimize the stress on the server by handling as much of the process on the client side as possible so I wonder how best to split up the tasks.
So far my idea is to have the client send the search term to the server who then compare it with its registry. Collecting the 30 or so most relevant hits it sends it back along with additional information from each entry. Requesting additional hits will be decided by sending a simple int value telling which page its filling up.
Simple example:
"Search word" gets processed by the client to account for spelling errors, context etc (based on what I can implement by myself). An Int value gets added (0 for page 1, 1 for page 2 etc...). The request gets sent to the server who can immediately run the search without processing the search word since that was handled in the client. It locates hits and order them by relevance then send out the information batch decided by the Int.
I am creating a WinForm registration application and my program accepts user input information and stores it but I am struggling to use my login function. I believe there is an error in the area of cmd.Parameters.AddWithValue section, I dont think addwithvalue is correct ? I get a fatal crash has occurred when I click Login
string constring = "datasource=127.0.0.1;port=3306;username=root;password=welcome"; string Query = "SELECT * FROM 'userinfo'.'users' where 'username' = @userid and 'password' = @password)"; MySqlConnection conDatabase = new MySqlConnection(constring); MySqlCommand cmd = new MySqlCommand(Query, conDatabase); cmd.Parameters.AddWithValue("@userid", this.userid_txt.Text); cmd.Parameters.AddWithValue("@passone", this.passone_txt.Text);
[code]....
Fixed the crash error, simple typo but now I am getting SQL Syntax errors which I originally believed I fixed.
I have a program in C#.net. There is a datagridview which shows all the details of the student. Then I add a column to update another column using the value I entered. Means I want to add roll no to student details table while running. I want the code to update it. Is it possible?
i have to upload a ms access database file to the server from my client program. The server program should connect to this database and read the data. What's the easiest way to upload the file? Is it FTP? i tried sockets, but it only allows like 9kb of data transfer capacity.
Write a program that is able to save a list of items such as books, CDs, or DVDs and the items that are saved must have attributes associated with them. For example a book has a title, author, publisher, and ISBN.I would like to create a program that is able to save the database of items to a file on the hard drive and also retrieve it from the hard drive.I have this for a start of how to set up a storing program.
#include <iostream> #include <iomanip> using namespace std; int main () { const int arraySize = 10; int a[arraySize] = { 2, 6, 4, 10, 12, 89, 68, 45, 37 }; int i, hold;
I have to write a program for a restaurant and their food has to be cooked on a hot sheet of metal and too cook their burgers properly I must keep a maintain temp of 400 F, for the grill and to measure the temperature using a probe at 12 points, there are 3 elements with 3 points on them
I'm trying to make a database that stores the information without overwrite it. I want this program to store the client’s selection in somewhere that doesn't change and also that creates a new storage for the new value any time the client enters a new selection instead of overwriting it. I did something like that in my code but any time the program runs again and the client enters a new selection, the client’s selection is overwritten with the new value. I don’t know if it’s possible to do that (store the client’s selection in somewhere where doesn't change) with C++. I've been reading and I think I can create a database for my program.
THIS IS MY CODE: #include <iostream> #include <string> using namespace std; // FUNCTIONS
I am trying to experiment with programs and databases. Right now I am trying to set up a database so that my program, which currently just appends its results onto a text file, will instead store each result into a database, because this will make things much easier to access than trying to read specific results from an ever-larger, disorganized text file.
A user is supposed to enter student name, id, and grade then sort them by name, id, or grade. I managed to get it to sort by name and id correctly, but not by grade.