summaryrefslogtreecommitdiffstats
path: root/C++/2D Arrays
diff options
context:
space:
mode:
authormsglm <msglm@techchud.xyz>2023-01-14 05:31:48 -0600
committermsglm <msglm@techchud.xyz>2023-01-14 05:31:48 -0600
commit9d53d8857eaa1c9405894a88ca75bc4657e42f35 (patch)
treeeb1efc1d028b949dd83bb710c68be8eff58f26e7 /C++/2D Arrays
downloadschool-code-9d53d8857eaa1c9405894a88ca75bc4657e42f35.tar.gz
school-code-9d53d8857eaa1c9405894a88ca75bc4657e42f35.tar.bz2
school-code-9d53d8857eaa1c9405894a88ca75bc4657e42f35.zip
Inital CommitHEADmaster
Diffstat (limited to 'C++/2D Arrays')
-rw-r--r--C++/2D Arrays/2D Arrays.cpp44
-rw-r--r--C++/2D Arrays/INSTRUCTIONS32
2 files changed, 76 insertions, 0 deletions
diff --git a/C++/2D Arrays/2D Arrays.cpp b/C++/2D Arrays/2D Arrays.cpp
new file mode 100644
index 0000000..d18f148
--- /dev/null
+++ b/C++/2D Arrays/2D Arrays.cpp
@@ -0,0 +1,44 @@
+// Name: msglm
+// Date: Nov 25th 2022
+// Program Name: 2D Arrays
+// Description:
+
+
+#include <iostream>
+#include <string>
+using namespace std;
+
+//classes
+class Person {
+ public:
+ string movies[2][4];
+ void getMovies() {
+ cout << "Enter your favorite movies: \n";
+ for(int x = 0; x < 2; x++) {
+ for(int y = 0; y < 4; y++) {
+ cout << "This will be going in position: (" << x << "," << y << ")\n";
+ getline(cin,movies[x][y]);
+ }
+ }
+ }
+ void output() {
+ for(int x = 0; x < 2; x++) {
+ for(int y = 0; y < 4; y++) {
+ cout << movies[x][y] << endl;
+ }
+ }
+ }
+};
+
+int main() {
+ Person person;
+ person.getMovies();
+ person.output();
+}
+/*
+ This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License Version 3 ONLY as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
diff --git a/C++/2D Arrays/INSTRUCTIONS b/C++/2D Arrays/INSTRUCTIONS
new file mode 100644
index 0000000..924f32d
--- /dev/null
+++ b/C++/2D Arrays/INSTRUCTIONS
@@ -0,0 +1,32 @@
+HW4: 2D Arrays
+Due November 29th, 2022 before midnight
+50 Points
+2D Arrays are only introduced in this course. You will use them in data structures instead. Therefore, this assignment is meant to let you become familiar with the concept before you move onto that class.
+In this assignment, you will watch the videos about 2D Arrays. Then, you will write a program that does the following:
+
+ Write a program using 2D Arrays that will store information from a user where they enter their favorite movie names. It is up to you to decide how many movie names will be entered
+ Output the information entered back onto the screen
+
+Assignment Notes:
+
+ This program will be written in an OOP environment using functions where possible
+ Use functions to get the data and to output the data
+ Keep the program short! This is not meant to be a big assignment. :D
+ You can look up information about 2D arrays if you need additional examples, but please, no copy/paste! Copy/paste = 0/50
+
+General Notes:
+Be sure to use comments in your program: Name, Program Description, Date and anywhere else in the program you deem necessary.
+Grading Rubric:
+
+ If you do not include comments at the top of the program (name, program description, date), you will lose 15 points
+ If your program is not object-oriented, you will receive a 0/50(OOP is requred for this assignment)
+ If your work is late (within 48 hours of the due date), you will lose 25 points
+ If your program is late beyond the 48 hour due date, I will typically still accept it, but you will lose far more points. Depends on when you turn it in
+ If your program is not formatted nicely (code all over the place, ugly), you will lose up to 25 points depending on the extent
+ If your program stops working when I run it, you will lose points. The exact amount depends on the severity of the error
+ If your program still has your friend's name on it, I will send you a message asking you to try harder while giving you a 0/50
+ If you submit a file type I cannot open, such as .sln, you will receive a 0/50. You will be able to resubmit for credit, but you will lose points (depending on how late it is)
+ If your program looks like a a professional programmer wrote it, I will write to you to ask if you want a job. Well, maybe not. But, I will ask about the code
+ This is just a list of typical issues I run into when grading to give you some idea of where your points go. Points can be taken off for other reasons.
+
+