Question

In: Computer Science

Write a rudimentary spreadsheet program using C++. Display a grid of cells with columns A through...

Write a rudimentary spreadsheet program using C++. Display a grid of cells with columns A through H and rows 1 through 20. Accept input in the first row of the screen. The commands are of the form column row entry, where entry is a number, a cell address preceded by a plus (e.g., +A5), a string, or a function preceded by an at sign, @. The functions are: max, min, avg, and sum. During execution of your program, build and modify the graph reflecting the situation in the spreadsheet. Show the proper values in proper cells. If a value in a cell is updated, then the values in all cells depending on it should also be modified. For example, after the following sequence of entries:

A1       10

B1       20

A2       30

D1       +A1

C1       @sum(A1..B2)

D1       +C1

both cells C1 and D1 should display the number 60.

The easiest way to draw this spreadsheet is to print it out in the terminal using cout. You should consider locking the number of cells in the spreadsheet and using ascii characters to represent the lines.

Solutions

Expert Solution


Related Solutions

Using c++, write a program that will display your name as a void function then will...
Using c++, write a program that will display your name as a void function then will perform the following by user-defined functions: a. to compute for the sum of two numbers (n1, n2) using function.
Write a C++ program to display toy name
Write a C++ program to display toy name
Backtracking Write a program in c++ that moves an asterisk ‘*’ in a grid of 10x10...
Backtracking Write a program in c++ that moves an asterisk ‘*’ in a grid of 10x10 cells. Your program should start with * on position (2,3) i.e. 3rd column of 2nd row. After printing the grid and ‘*’, your program will ask user if he wants to move the ‘*’ Up, Down, Left or Right. If user presses ‘U’, ‘D’, ‘L’ or ‘R’, your program will move the ‘*’ one position accordingly. If user presses ‘Q’, your program should terminate....
Write a C program that meets the following requirements. Uses a while loop to display the...
Write a C program that meets the following requirements. Uses a while loop to display the first 10 natural numbers (on one row, with a tab separating each number) Uses a while loop to find the sum of the second set of 10 natural numbers. Reads a user entry and displays all the natural numbers up to the user entry (on a column list with a new line separating each number). Finds and displays the sum of all natural numbers...
Write a C++ program that will display the top internet stories from the stories.txt file The...
Write a C++ program that will display the top internet stories from the stories.txt file The program must display the stories that have a score which the statistical "mode". The "mode" of a set of values is the value that occurs most often (with the greatest frequency) The data about the stories is in a file that contains the following: storyTitle    (a sequence of numbers and/or letters, may contain spaces in it) storyURL    (a regular URL, like http://www.twitter.com/story1,without spaces) score        (an integer number,...
Write a script to display the following patterns on the screen. Number of rows and columns...
Write a script to display the following patterns on the screen. Number of rows and columns are taken from the command arguments; if they are missing, set default to 3 (rows) and 4 (columns). Hint: you will use a nested loop. **** **** **** a) Display the source code in an editor (#4-11) b) Execute your script in the terminal, and display the command and the result (#4-12)
Using python Write a program that displays all of states in the U.S. and display each...
Using python Write a program that displays all of states in the U.S. and display each state that begins with the letter A.
Write a program to display privilege list of the roles and role list for privileges using...
Write a program to display privilege list of the roles and role list for privileges using many to many concept. Problem Specification: 1. Prefill the data for roles and privileges. 2. Create a menu 1. Assign privilege 2. Cancel privilege 3. Search privilege by role 4. Search role by privilege. 3. Assign privilege -- To assign specific privilege for role. 4. Cancel Privilege -- To cancel specific privilege for role. 5. Search privilege by role -- To display all the...
Write a program using c++. Write a program that uses a loop to keep asking the...
Write a program using c++. Write a program that uses a loop to keep asking the user for a sentence, and for each sentence tells the user if it is a palindrome or not. The program should keep looping until the user types in END. After that, the program should display a count of how many sentences were typed in and how many palindromes were found. It should then quit. Your program must have (and use) at least four VALUE...
Need to create a program in C++ that can display/write into a file called marks.txt. I'm...
Need to create a program in C++ that can display/write into a file called marks.txt. I'm not too worried about the functions, but I don't know how to store the different marks into a arrays. Any help would be appreaciated. Here's some details about the assignment. Student marks are kept in a text file as a single column. Each student may have a different number of assessments and therefore scores. The data recorded in the file for each student start...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT