Create a stack of size M for storing integer data. Our task is to insert a node at position P = M/2. If P is a decimal number, then P can be rounded to the nearest integer.
Hint: A temporary stack can be used to store the data while inserting a new node. Use header file math.h and routine round(P), to round P to the nearest integer.
Create a GUI application “Address Book” which can be used to store and search the information of different people. The information can be: name, phone no, email, street address etc. Your project should have the following features:
1. A GUI where user can input the information of a particular people
2. A file where all information are stored. (You will have to append new info to the file. Otherwise the previous information will be lost.
3. A GUI in which the user will be able to see all the information, sorted by name. The information must come from the file where you stored user information. (Hint: use JTextArea to show all user info)
4. A GUI where the user will be able to search a person using his name or phone no. The search result should show the info of all the matched person
5. A GUI where the user will be able to edit the information of a specific person.
write a program that swaps values between different locations in a two dimensional array. make sure that the locations between which the values are being exchanged are symmetric.
write a program that uses a two dimensional of 256*8 to store 8 bit binary representations of each of the characters of ASCII character set.
write a program that swaps values between different locations in a two dimensional array.
make sure that the location between which the values are being exchanged are symmetric.
Write an array function to shift all elements by one to the left and move the first element into the last position. For example, 2 6 10 15 26 would be transformed into 6 10 15 26 2.
Write a void function printArray() that takes a double array and the size of the array as an int and prints the values. void shift left(double values[], int size); void printArray(double values[], int size); Here is the main function to test your function.
int main()
{
const int LENGTH = 10;
double p[LENGTH] = {10, 15, 7.9, 8.5, 12, 14.3, 16.0, 17.99, 19.3, 23.5};
cout << "\nThe original array follows ...\n";
printArray(p, LENGTH);
cout << "\n\nThe left shifted array follows: \n";
shift_left(p, LENGTH);
printArray(p, LENGTH); //Prints 15, 7.9, 8.5, 12, 14.3, 16.0, 17.99, 19.3, 23.5, 10
cout << "\n\nThe left shifted array follows: \n";
shift_left(p, LENGTH);
printArray(p, LENGTH);//Prints 7.9, 8.5, 12, 14.3, 16.0, 17.99, 19.3, 23.5, 10, 15
cout << "\n\nThe left shifted array follows: \n";
shift_left(P, LENGTH);
printArray(p, LENGTH);//Prints 8.5, 12, 14.3, 16.0, 17.99, 19.3, 23.5, 10, 15, 7.9
return 0;
}
Project 5: Social Media account
Implement a program that manages the data of the social media account. The user can access only his/her own account. The account is characterized by username, password, name, sumame, birth date and list of friends (characterised by the account username). The data are stored into a json file. The application should manage the following characteristics:
Sign up: register to the system
Sign in: by providing usename and password and showing all the user data
Search for a user (using name and surname)
Add a used to the friend list
Changes need to be stored back in the file. The above functionalities are implemented through methods of a class named SocialMedia. The application interacts with the user through a menu where the user is asked for the next action to undertake (e.g., 1-Sign Up, 2
Sign In, etc.) Put comments in your code.
Project 4: Music Store
Implement a program that manages the data of a music store. The store manages the list of CDs that can be bought. For each CD, the store has the following data: album title, singer/band name, recording house, published year, music genre, and a list of song titles.
The data are stored into a json file. The application should manage the following characteristics:
Add a new CD
Remove existing CD
Show all CDs of a given singer/band . Show all CDs containing a specific song (identified by song title)
Changes need to be stored back in the file. The above functionalities are implemented through methods of a class named TravelAgency. The application interacts with the user through a menu where the user is asked for the next action to undertake (e.g., 1-Add new CD, 2-Remove existing CD, etc.) Put comments in your code.
Design a C program to exchange the keys. The Two friends Bob and Jim met in a bank and discussed about their secret code. They decided to exchange their passwords for further transactions. Password of Bob is "Apple" and Jim is Orange". Print the password of Jim and Bob.