Lorem ipsum dolor sit amet consectetur adipisicing elit. Itaque quidem explicabo animi accusamus temporibus ex error odit porro dolore in quasi nulla voluptatem consectetur labore, quis, autem, voluptates id natus! Lorem ipsum dolor sit amet consectetur adipisicing elit. Iusto, nesciunt deleniti, exercitationem totam amet a laudantium ut tenetur itaque quos similique in molestiae eligendi ipsam voluptatibus repellendus vitae sequi consequatur.
+ This is a smaller paragraph!
+
+
Heading Two
+
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Unde illo ratione culpa nisi. Repellat, at! Eaque quasi, sequi, quo exercitationem similique provident incidunt, temporibus nam repellendus dolores vero dolor sed? Lorem ipsum dolor, sit amet consectetur adipisicing elit. Corrupti deserunt quaerat quas, non ipsa pariatur? Nulla cum ullam, dolore autem repellat voluptatum est modi fuga a odit at repudiandae dolor!
+
+
+
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempora quidem rem, autem deserunt pariatur ex quos ab excepturi quasi odit veritatis labore vitae animi fugit dicta, totam commodi. Cumque, expedita! Lorem ipsum dolor sit amet consectetur adipisicing elit. Maiores cum illum, tempore nisi maxime est aut delectus exercitationem sapiente veritatis id vero enim, reiciendis blanditiis quis temporibus voluptate dolorum dignissimos?
+
+
First item
+
Second item
+
Third item
+
Fouth item
+
+
+
+
+>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb
\ No newline at end of file
diff --git a/INFO-1252 (Front End Dev)/Labs/Lab-1/style.css b/INFO-1252 (Front End Dev)/Labs/Lab-1/style.css
index aabf8c2..b453275 100644
--- a/INFO-1252 (Front End Dev)/Labs/Lab-1/style.css
+++ b/INFO-1252 (Front End Dev)/Labs/Lab-1/style.css
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
body {
text-align: center;
background: #333;
@@ -19,4 +20,27 @@ a {
color: deepskyblue;
text-align: center;
margin: auto;
+=======
+body {
+ text-align: center;
+ background: #333;
+ color: white;
+}
+
+ul, ol {
+ margin: 0;
+ padding: 0;
+ display: inline-block;
+ text-align: left;
+}
+
+ul li {
+ list-style: none;
+}
+
+a {
+ color: deepskyblue;
+ text-align: center;
+ margin: auto;
+>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb
}
\ No newline at end of file
diff --git a/INFO-1252 (Front End Dev)/Labs/Lab-2/about.html b/INFO-1252 (Front End Dev)/Labs/Lab-2/about.html
index fefcc1e..2d12284 100644
--- a/INFO-1252 (Front End Dev)/Labs/Lab-2/about.html
+++ b/INFO-1252 (Front End Dev)/Labs/Lab-2/about.html
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
@@ -30,4 +31,38 @@
Lorem ipsum dolor sit amet consectetur adipisicing elit. Sapiente laborum non voluptatibus ad dignissimos culpa labore vitae quae nostrum in ullam officia, nobis quis tempora corporis repellendus suscipit quo nisi. Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquam eum officia provident cumque rem earum perferendis similique expedita quos ipsa! Ipsum cumque illum eius reprehenderit harum minus, deserunt iusto fugiat!
+
Satisfaction Guaranteed!
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Deleniti libero commodi, nesciunt sed non a necessitatibus iste illum architecto eum cumque quo nemo, praesentium magni vero facilis iusto. Quaerat, nulla! Lorem ipsum dolor sit amet consectetur adipisicing elit. Placeat eveniet dicta, similique facilis impedit corporis repellat aliquid autem veritatis eaque eos, velit cupiditate ratione enim vel dolorum, laborum ut. Ipsum.
+
+>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb
\ No newline at end of file
diff --git a/INFO-1252 (Front End Dev)/Labs/Lab-2/contact.html b/INFO-1252 (Front End Dev)/Labs/Lab-2/contact.html
index 1f8647b..36c9d71 100644
--- a/INFO-1252 (Front End Dev)/Labs/Lab-2/contact.html
+++ b/INFO-1252 (Front End Dev)/Labs/Lab-2/contact.html
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
@@ -56,4 +57,64 @@
+
+>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb
\ No newline at end of file
diff --git a/INFO-1252 (Front End Dev)/Labs/Lab-2/index.html b/INFO-1252 (Front End Dev)/Labs/Lab-2/index.html
index e25c11d..cd2d613 100644
--- a/INFO-1252 (Front End Dev)/Labs/Lab-2/index.html
+++ b/INFO-1252 (Front End Dev)/Labs/Lab-2/index.html
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
@@ -22,4 +23,30 @@
Lorem ipsum dolor sit amet consectetur, adipisicing elit. Nostrum autem odio voluptas similique quae quam totam, est sapiente neque omnis veniam pariatur sint, culpa mollitia, porro facilis deserunt eum dicta! Lorem ipsum dolor sit amet consectetur adipisicing elit. Eaque provident cum, est iusto, a suscipit beatae expedita voluptatem dignissimos harum porro sint eveniet tempore. Et itaque dolorum recusandae quis soluta. Lorem ipsum dolor sit amet consectetur adipisicing elit. Quas quidem voluptatibus amet, reiciendis sit eligendi nihil! Ducimus praesentium delectus at itaque quaerat blanditiis rem asperiores adipisci facilis aliquam? Error, libero!
+
+
Lorem ipsum dolor sit amet consectetur adipisicing elit. Sapiente laborum non voluptatibus ad dignissimos culpa labore vitae quae nostrum in ullam officia, nobis quis tempora corporis repellendus suscipit quo nisi. Lorem ipsum dolor sit amet consectetur adipisicing elit. Aliquam eum officia provident cumque rem earum perferendis similique expedita quos ipsa! Ipsum cumque illum eius reprehenderit harum minus, deserunt iusto fugiat!
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc
+ mollis, nulla non elementum tincidunt, felis ligula sodales lectus,
+ sit amet dignissim quam massa sit amet lorem. Aenean lorem risus,
+ tempus nec, gravida eu.
+
+
+
+
+
Weeknight Meals
+
By: Mary
+
Jan 07, 2022
+
+
+ Donec cursus faucibus turpis. Quisque auctor est at magna. In
+ sagittis quam ac ante. Etiam et erat. Morbi sem. Mauris faucibus
+ elit eu est. Nulla wisi eros, vehicula et, congue quis, consectetuer
+ non, leo. Phasellus suscipit felis non est.
+
+
+
+
+
Superbowl Snacks
+
By: Sandy
+
Jan 06, 2022
+
+
+ Pellentesque habitant morbi tristique senectus et netus et malesuada
+ fames ac turpis egestas. Morbi condimentum, odio sit amet aliquet
+ adipiscing, nunc odio fermentum tellus, tincidunt pulvinar leo purus
+ quis libero. Vivamus quam.
+
+
+
+
+
+
+
About Sandy
+
+
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum
+ gravida mattis molestie. Donec in urna ut dolor imperdiet faucibus.
+ Pellentesque habitant morbi tristique senectus et netus et malesuada
+ fames ac turpis egestas. Sed luctus a mi et facilisis. Class aptent
+ taciti sociosqu ad litora torquent per conubia nostra, per inceptos
+ himenaeos. Ut condimentum purus eu luctus tincidunt. Maecenas
+ elementum, augue at vulputate ornare, ipsum enim lacinia orci, id
+ elementum velit enim gravida diam. Aliquam vitae pharetra ex. In hac
+ habitasse platea dictumst. Curabitur vitae facilisis nulla. Morbi quis
+ condimentum lorem. Fusce sit amet orci mauris. Donec fringilla lectus
+ nec efficitur sagittis. Aliquam sed nunc ligula.
+
+
+ Quisque tempus ornare est, eu scelerisque sem ultricies et. Sed sed
+ interdum odio. Suspendisse id lacinia sem. Cras fermentum tortor sit
+ amet mollis commodo. Morbi facilisis arcu a est dapibus, vitae laoreet
+ sapien feugiat. Aenean vel viverra arcu, eu pulvinar nulla.
+ Pellentesque habitant morbi tristique senectus et netus et malesuada
+ fames ac turpis egestas. Mauris id viverra leo, sed pellentesque est.
+ Maecenas quis hendrerit dui, tincidunt maximus velit.
+
+ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc
+ mollis, nulla non elementum tincidunt, felis ligula sodales lectus,
+ sit amet dignissim quam massa sit amet lorem. Aenean lorem risus,
+ tempus nec, gravida eu.
+
+
+
+
+
Weeknight Meals
+
By: Mary
+
Jan 07, 2022
+
+
+ Donec cursus faucibus turpis. Quisque auctor est at magna. In
+ sagittis quam ac ante. Etiam et erat. Morbi sem. Mauris faucibus
+ elit eu est. Nulla wisi eros, vehicula et, congue quis, consectetuer
+ non, leo. Phasellus suscipit felis non est.
+
+
+
+
+
Superbowl Snacks
+
By: Sandy
+
Jan 06, 2022
+
+
+ Pellentesque habitant morbi tristique senectus et netus et malesuada
+ fames ac turpis egestas. Morbi condimentum, odio sit amet aliquet
+ adipiscing, nunc odio fermentum tellus, tincidunt pulvinar leo purus
+ quis libero. Vivamus quam.
+
+
+
+
+
+
+
About Sandy
+
+
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum
+ gravida mattis molestie. Donec in urna ut dolor imperdiet faucibus.
+ Pellentesque habitant morbi tristique senectus et netus et malesuada
+ fames ac turpis egestas. Sed luctus a mi et facilisis. Class aptent
+ taciti sociosqu ad litora torquent per conubia nostra, per inceptos
+ himenaeos. Ut condimentum purus eu luctus tincidunt. Maecenas
+ elementum, augue at vulputate ornare, ipsum enim lacinia orci, id
+ elementum velit enim gravida diam. Aliquam vitae pharetra ex. In hac
+ habitasse platea dictumst. Curabitur vitae facilisis nulla. Morbi quis
+ condimentum lorem. Fusce sit amet orci mauris. Donec fringilla lectus
+ nec efficitur sagittis. Aliquam sed nunc ligula.
+
+
+ Quisque tempus ornare est, eu scelerisque sem ultricies et. Sed sed
+ interdum odio. Suspendisse id lacinia sem. Cras fermentum tortor sit
+ amet mollis commodo. Morbi facilisis arcu a est dapibus, vitae laoreet
+ sapien feugiat. Aenean vel viverra arcu, eu pulvinar nulla.
+ Pellentesque habitant morbi tristique senectus et netus et malesuada
+ fames ac turpis egestas. Mauris id viverra leo, sed pellentesque est.
+ Maecenas quis hendrerit dui, tincidunt maximus velit.
+
+
+
+
+>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb
\ No newline at end of file
diff --git a/INFO-1272 (JS 1)/Labs/Lab 2/levi_lab2.html b/INFO-1272 (JS 1)/Labs/Lab 2/levi_lab2.html
index 1eb9f13..698756e 100644
--- a/INFO-1272 (JS 1)/Labs/Lab 2/levi_lab2.html
+++ b/INFO-1272 (JS 1)/Labs/Lab 2/levi_lab2.html
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
@@ -78,4 +79,86 @@
+=======
+
+
+
+
+ Lab 2
+
+
+
+
Theme Park Tickets
+
+
+
+>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb
\ No newline at end of file
diff --git a/INFO-1272 (JS 1)/Labs/Lab 3/Levi_Lab3.html b/INFO-1272 (JS 1)/Labs/Lab 3/Levi_Lab3.html
index cb13a8c..541544d 100644
--- a/INFO-1272 (JS 1)/Labs/Lab 3/Levi_Lab3.html
+++ b/INFO-1272 (JS 1)/Labs/Lab 3/Levi_Lab3.html
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
@@ -58,4 +59,66 @@
}
+=======
+
+
+
+ Lab 3
+
+
+
+
+
Lab 3
+
+
+>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb
\ No newline at end of file
diff --git a/INFO-1272 (JS 1)/Labs/Lab 5/Levi_Lab5.html b/INFO-1272 (JS 1)/Labs/Lab 5/Levi_Lab5.html
index 902020e..ee4f9e1 100644
--- a/INFO-1272 (JS 1)/Labs/Lab 5/Levi_Lab5.html
+++ b/INFO-1272 (JS 1)/Labs/Lab 5/Levi_Lab5.html
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
@@ -90,4 +91,98 @@
+=======
+
+
+
+
+ Lab 5
+
+
+
+
+
Lab 5
+
+
+
+>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb
\ No newline at end of file
diff --git a/INFO-1272 (JS 1)/Labs/Midterm Part B/Levi_McLean_MidtermTest copy.html b/INFO-1272 (JS 1)/Labs/Midterm Part B/Levi_McLean_MidtermTest copy.html
index 87d3c71..d27524d 100644
--- a/INFO-1272 (JS 1)/Labs/Midterm Part B/Levi_McLean_MidtermTest copy.html
+++ b/INFO-1272 (JS 1)/Labs/Midterm Part B/Levi_McLean_MidtermTest copy.html
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
@@ -127,4 +128,135 @@
}
+=======
+
+
+
+ Levi McLean Midterm Part B
+
+
+
+
+
Levi McLean Midterm Part B
+
+
+>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb
\ No newline at end of file
diff --git a/INFO-1272 (JS 1)/Labs/Midterm Part B/Levi_McLean_MidtermTest.html b/INFO-1272 (JS 1)/Labs/Midterm Part B/Levi_McLean_MidtermTest.html
index 7c6613f..ea14425 100644
--- a/INFO-1272 (JS 1)/Labs/Midterm Part B/Levi_McLean_MidtermTest.html
+++ b/INFO-1272 (JS 1)/Labs/Midterm Part B/Levi_McLean_MidtermTest.html
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
@@ -135,4 +136,143 @@
}
+=======
+
+
+
+ Levi McLean Midterm Part B
+
+
+
+
+
Levi McLean Midterm Part B
+
+
+>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb
\ No newline at end of file
diff --git a/INFO-1272 (JS 1)/Notes/Final/index.html b/INFO-1272 (JS 1)/Notes/Final/index.html
new file mode 100644
index 0000000..04b1e03
--- /dev/null
+++ b/INFO-1272 (JS 1)/Notes/Final/index.html
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+ INFO-1272 Final Notes
+
+
+
+
INFO-1272 Final Notes
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/INFO-1272 (JS 1)/Notes/Final/index.js b/INFO-1272 (JS 1)/Notes/Final/index.js
new file mode 100644
index 0000000..58f0bb7
--- /dev/null
+++ b/INFO-1272 (JS 1)/Notes/Final/index.js
@@ -0,0 +1,239 @@
+// for (var count = 0; count <= 5; count++) {
+// console.log("This is count: " + count);
+// }
+
+// for (var count = 0; count < 7; count += 2) {
+// console.log("This is count: " + count);
+// }
+
+// for (var count = 10; count >= 0; count--) {
+// console.log("This is count: " + count);
+// }
+
+// console.log(Math.round(4.6666666));
+// console.log(Math.ceil(4.6666666));
+// console.log(Math.min(0, 100));
+
+// function sumArray(arr) {
+// var sum = 0;
+// for (var i = 0; i < arr.length; i++) {
+// sum += arr[i];
+// }
+// return sum;
+// }
+
+// function reverseString(inString) {
+// var outString = "";
+// for (var i = inString.length - 1; i >= 0; i--) {
+// outString += inString[i];
+// }
+// return outString;
+// }
+
+// function printMessage() {
+// var userInput = document.getElementById("textInput").value;
+// console.log("You entered: ", userInput);
+// }
+
+// function currentTime() {
+// var now = new Date();
+// console.log(now.toLocaleDateString());
+// }
+
+// function randomArray(arr) {
+// var numElements = 10;
+// for (var i = 0; i < numElements; i++) {
+// arr.push(Math.floor(Math.random() * 100) + 1);
+// }
+// return arr;
+// }
+
+// var testArr = [1,2,3,4,5];
+// var total = sumArray(testArr);
+// console.log(total);
+
+// console.log(reverseString("Penis"));
+
+// // printMessage();
+// currentTime();
+// console.log(randomArray(testArr));
+
+// var testDate = new Date();
+// console.log(testDate.getDate()); // DAY OF MONTH
+// console.log(testDate.getDay()); // DAY OF WEEK
+// console.log(testDate.getFullYear());
+// console.log(testDate.getMonth()); // STARTS AT 0
+// console.log(testDate.getTime());
+// console.log(testDate.getHours());
+
+// function dateSlashes() {
+// var date = new Date();
+// var day = date.getDate();
+// var month = date.getMonth() + 1;
+// var year = date.getFullYear()
+// console.log(month + "/" + day + "/" + year);
+// }
+
+// function dateSlashesReverse() {
+// var date = new Date();
+// var day = date.getDate();
+// var month = date.getMonth() + 1;
+// var year = date.getFullYear()
+// console.log(year + "/" + month + "/" + day);
+// }
+
+// function monthWords () {
+// var date = new Date();
+// var day = date.getDate();
+// var monthNames = [
+// "January", "February", "March", "April", "May", "June",
+// "July", "August", "September", "October", "November", "December"
+// ]
+// var month = monthNames[date.getMonth()];
+// var year = date.getFullYear();
+// console.log(month + " " + day + ", " + year);
+// }
+
+// function monthWordsLong () {
+// var date = new Date();
+// var dayNames = [
+// "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"
+// ]
+// var weekDay = dayNames[date.getDay()];
+// var day = date.getDate();
+// var monthNames = [
+// "January", "February", "March", "April", "May", "June",
+// "July", "August", "September", "October", "November", "December"
+// ]
+// var month = monthNames[date.getMonth()];
+// var year = date.getFullYear();
+// console.log(weekDay + ", " + month + " " + day + ", " + year);
+// }
+
+// function printTime() {
+// var date = new Date();
+// var hour = date.getHours();
+// var minutes = date.getMinutes();
+// if (minutes < 10) {
+// minutes = "0" + date.getMinutes();
+// }
+// console.log(hour + ":" + minutes);
+// }
+
+// function printTime12Hr() {
+// var date = new Date();
+// var hour = date.getHours();
+// var minutes = date.getMinutes();
+// if (minutes < 10) {
+// minutes = "0" + minutes;
+// }
+// var half = hour < 12 ? "AM" : "PM";
+
+// hour = hour % 12;
+// if (hour === 0) {
+// hour = 12;
+// }
+
+// console.log(hour + ":" + minutes + " " + half);
+// }
+
+// dateSlashes();
+// dateSlashesReverse();
+// monthWords();
+// monthWordsLong();
+// printTime();
+// printTime12Hr();
+
+// switch(expression) {
+// case x: // can be anything really
+// //thing to do
+// break;
+// case y:
+// //different thing to do
+// break;
+// default:
+// //default behaviour
+// break; // without break, the program will execute the following cases
+// }
+
+// person = {
+// name: "Undefined",
+// age: 0
+// };
+
+// function Person(name, age) {
+// this.name = name;
+// this.age = age;
+// }
+
+// console.log(person);
+// var people = [new Person("Levi", 20), new Person("Tyler", 20), new Person("Stu", 19), new Person("Andrew", 21)]
+// console.log(people);
+
+function Student(name) {
+ this.name = name;
+ this.score = 0;
+}
+
+function generateQuestions() {
+ for (let i = 0; i < numQuestions; i++) {
+ const q = generateRandomQuestion();
+ console.log(q.question, q.answer);
+ document.getElementById("question").textContent = q.question;
+ }
+
+};
+
+function generateRandomQuestion() {
+ const operators = ["+", "-", "*", "/"];
+ const operator = operators[Math.floor(Math.random() * operators.length)];
+ var num1 = Math.floor(Math.random() * 20) + 1;
+ var num2 = Math.floor(Math.random() * 20) + 1;
+
+ if (operator === "/") {
+ num1 = num1 * num2;
+ }
+
+ const questionStr = `${num1} ${operator} ${num2}`;
+ var answer;
+
+ switch(operator) {
+ case "+":
+ answer = num1 + num2;
+ break;
+ case "-":
+ answer = num1 - num2;
+ break;
+ case "*":
+ answer = num1 * num2;
+ break;
+ case "/":
+ answer = num1 / num2;
+ break;
+ }
+
+ return { question: questionStr, answer: answer };
+}
+
+var currentStudent = null;
+var numQuestions = 0;
+var currentQuestion = 0;
+
+document.getElementById("startBtn").addEventListener("click", function() {
+ const nameInput = document.getElementById("studentName").value.trim();
+ const numInput = parseInt(document.getElementById("numQuestions").value);
+
+ if (nameInput === "" || isNaN(numInput) || numInput <= 0) {
+ alert("Please enter a valid name and a number of questions above 0.");
+ return;
+ }
+
+ currentStudent = new Student(nameInput);
+ numQuestions = numInput;
+ currentQuestion = 1;
+
+ document.getElementById("quizArea").style.display = "block";
+ document.getElementById("currentStudent").textContent = "Student: " + currentStudent.name;
+
+ generateQuestions();
+});
\ No newline at end of file
diff --git a/INFO-1272 (JS 1)/Notes/Final/index2.html b/INFO-1272 (JS 1)/Notes/Final/index2.html
new file mode 100644
index 0000000..c874d5f
--- /dev/null
+++ b/INFO-1272 (JS 1)/Notes/Final/index2.html
@@ -0,0 +1,9 @@
+
+
+ Index 2 Final Notes
+
+
+
+
Index 2 Final Notes
+
+
\ No newline at end of file
diff --git a/INFO-1272 (JS 1)/Notes/Final/index2.js b/INFO-1272 (JS 1)/Notes/Final/index2.js
new file mode 100644
index 0000000..17275bf
--- /dev/null
+++ b/INFO-1272 (JS 1)/Notes/Final/index2.js
@@ -0,0 +1,97 @@
+function Student(name, age, grade) {
+ this.name = name,
+ this.age = age,
+ this.grade = grade
+};
+
+function Car(brand, model, year, isElectric) {
+ this.brand = brand,
+ this.model = model,
+ this.year = year,
+ this.isElectric = isElectric,
+ this.describe = function() {
+ console.log(`This is a ${this.year} ${this.brand} ${this.model}`);
+ }
+};
+
+function House(type, bedrooms, price) {
+ this.type = type;
+ this.bedrooms = bedrooms;
+ this.price = price;
+}
+
+function Employee(name, position, salary) {
+ this.name = name,
+ this.position = position,
+ this.salary = salary,
+ this.increaseSalary = function(amount) {
+ this.salary += amount;
+ }
+}
+
+function Movie(title, genre, rating) {
+ this.title = title,
+ this.genre = genre,
+ this.rating = rating,
+ this.rateMovie = function(newRating) {
+ this.rating = newRating;
+ }
+}
+
+function Course(courseName, instructor, schedule) {
+ this.courseName = courseName;
+ this.instructor = instructor;
+ this.schedule = schedule;
+}
+
+var student1 = new Student("Levi McLean", 20, 99);
+var student2 = new Student("Tyler Hird", 19, 88);
+var student3 = new Student("Joe Jefferson", 21, 75);
+
+var car1 = new Car("Tesla", "Model 3", 2025, true);
+var car2 = new Car("Ford", "F-150", 2020, false);
+
+var house1 = new House("Bungalow", 2, 250000);
+var house2 = new House("Town House", 3, 375000);
+
+var employee1 = new Employee("Jimmy Joe", "Manager", 80000);
+
+var movie1 = new Movie("Kill Bill", "Action", 4.4);
+var movie2 = new Movie("Star Wars", "Action", 3.7);
+
+console.log(student1.name + " " + student1.grade);
+console.log(student2.name + " " + student2.grade);
+console.log(student3.name + " " + student3.grade);
+
+if (car1.isElectric === true) {
+ console.log(`${car1.brand} ${car1.model} is an electric car!`)
+} if (car2.isElectric === true) {
+ console.log(`${car2.brand} ${car2.model} is an electric car!`)
+}
+
+car1.describe();
+car2.describe();
+
+console.log(`The ${house1.type} has ${house1.bedrooms} bedrooms and costs $${house1.price}`);
+console.log(`The ${house2.type} has ${house2.bedrooms} bedrooms and costs $${house2.price}`);
+
+console.log(`Previous ${employee1.position} salary: $${employee1.salary}.`);
+console.log("Increasing salary by $1000000");
+employee1.increaseSalary(1000000);
+console.log(`New ${employee1.position} salary: $${employee1.salary}.`);
+
+console.log(`Previous rating for ${movie1.title}: ${movie1.rating}`);
+console.log(`Previous rating for ${movie2.title}: ${movie2.rating}`);
+movie1.rateMovie(5);
+console.log(`New rating for ${movie1.title}: ${movie1.rating}`);
+console.log(`New rating for ${movie2.title}: ${movie2.rating}`);
+
+var courseSchedule = {
+ day: "Monday",
+ time: "10:00 AM",
+ location: "Room 101"
+};
+
+var course1 = new Course("JavaScript 1", "Mr. Smith", courseSchedule);
+
+console.log(`The ${course1.courseName} course is taught by ${course1.instructor} on ${course1.schedule.day} at ${course1.schedule.time} in ${course1.schedule.location}`)
\ No newline at end of file
diff --git a/INFO-1272 (JS 1)/Notes/Midterm/index.html b/INFO-1272 (JS 1)/Notes/Midterm/index.html
index a57e362..3408e6d 100644
--- a/INFO-1272 (JS 1)/Notes/Midterm/index.html
+++ b/INFO-1272 (JS 1)/Notes/Midterm/index.html
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
@@ -173,4 +174,181 @@
+=======
+
+
+
+
+ Midterm Study
+
+
+
+
+
Midterm Study
+
Introduction to Web Pages
+
+
A web page is a container for the following three technologies. Describe the purpose of each for a web page:
+
+
+
HTML
+
CSS
+
JavaScript
+
+
+
Answers:
+
+
HTML is used for defining web elements and the rough layout of a website
+
CSS is used to style the default HTML elements
+
JavaScript is used for data input, manipulation and other logical components
+
+
+
+
Introduction to javascript
+
+
Browser pop-up dialogue box functions
+
+
alert()
+
prompt()
+
confirm()
+
+
+
Answers:
+
+
Reload webpage to see examples
+
+
+
+
Data Types and Variables
+
+
Name JavaScript's three data types. Describe the types of data they store
+
JavaScript is a weakly-typed language. Describe what this means.
+
What are the naming rules for a variables name? What are naming conventions?
+
What is a constant in JavaScript? Describe how you would declare a JavaScript constant.
+
+
Answers:
+
+
Number, String and Boolean
+
weakly-typed language implies that data types do not need to be defined at initialization, the compiler will
+ decide, cast and convert the data type unless explicitly cast
+
A naming convention is a recommended way of naming variables to ensure readability and organize code.
+ JavaScript uses camelCase for variables and classes and UPPER_SNAKE_CASE for constants
A constant is a variable whose value cannot be changed once initialized, making it constant. To define a
+ constant, use the "const" keyword.
+
+
+
+
Operators
+
+
Explain the following binary operators: + - * / %
+
Explain the multiple uses of the + operator.
+
Describe how the increment/decrement operators (++ and --) work.
+
+
Answers:
+
+
The + operator is used to get the sum, the - operator is to get the difference, the * operator multiplies,
+ the / operator divides and the % (modulus) operator determines if two numbers divided have a remainder and
+ how much of one
+
The + operator can be used to add two numbers together to find their sum, or you can use it to concatenate
+ multiple Strings together.
+
The ++ (increment) operator is used to increase the value of a variable by exactly one. The -- (decrement)
+ operator is used to decrease the value of a variable by exactly 1.
+
+
+
+
The JavaScript Math object
+
+
Describe the operation and the return for the following Math methods:
+
+
Math.PI
+
Math.abs(x)
+
Math.pow(x,2)
+
Math.round(x)
+
Math.ceil(x)
+
Math.floor(x)
+
Math.trunc(x)
+
Math.random()
+
Math.min(x,y)
+
Math.max(x,y)
+
+
+
Answers:
+
+
Math.PI is a constant value for PI
+
Math.abs(x) returns the absolute value of X (makes a negative positive)
+
Math.pow(x,2) returns the value of x to the power of y (in this case 2)
+
Math.round(x) returns x rounded to the nearest whole. Below 0.5 is rounded down, above 0.5 is rouded up.
+
+
Math.ceil(x) returns the "ceiling" of x, which is the next highest whole integer.
+
Math.floor(x) returns the "floor" of x, which is the next lowest whole integer.
+
Math.trunc(x) returns x truncated, which means it cuts off the decimal places regardless of what they are.
+
+
Math.random() returns a random number between 0 and 1, can be manipulated to return in between any range
+
+
Math.min(x,y) returns the minimum of two numbers. The smaller of the two
+
Math.max(x,y) returns the maximum of two numbers. The larger of the two
+
+
+
+
JavaScript Number Methods
+
+
Describe the operation and the return for the following Number methods:
+
+
toFixed()
+
toPrecision()
+
+
+
Answers:
+
+
toFixed() returns x but at a fixed number of decimal places, defined by y
+
toPrecision() returns x but at a fixed number of significant digits. This means it may round deicimal places
+ before dropping them.
+
+
+
+
JavaScript Global Functions
+
+
Describe the operation and the return for the following global functions:
+
+
parseInt(number)
+
parseFloat(number)
+
+
+
Answers:
+
+
parseInt(number) takes a string as input and returns the first integer in the string. Can also accept a
+ radix option
+
parseFloat(number) takes a string as input and returns the first float value in the string.
+
+
+
+
JavaScript String Methods
+
+
Describe the operation and the return for the following String methods.
+
+
length
+
toLowerCase()
+
toUpperCase()
+
charAt()
+
+
+
Answers:
+
+
length gets the character count of a string including spaces
+
toLowerCase() turns all uppercase letters to lowercase letters
+
toUpperCase() turns all lowercase letters to uppercase letters
+
chatAt() takes a number for the index of the word to search through and returns the character at that index.
+
+
+
+
Playground
+
Interactive JavaScript follows
+
+
+
+
+>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb
\ No newline at end of file
diff --git a/INFO-1272 (JS 1)/Notes/Midterm/index.js b/INFO-1272 (JS 1)/Notes/Midterm/index.js
index 24132e3..870ba0c 100644
--- a/INFO-1272 (JS 1)/Notes/Midterm/index.js
+++ b/INFO-1272 (JS 1)/Notes/Midterm/index.js
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
// for (var i = 1; i < 10; i++) {
// console.log("Ran " + i + " time(s).")
// };
@@ -187,4 +188,195 @@ if (charCount >= 10 && numCount >= 3 && symCount >= 1) {
window.alert("Your password is OKAY");
} else {
window.alert("Your password is WEAK");
+=======
+// for (var i = 1; i < 10; i++) {
+// console.log("Ran " + i + " time(s).")
+// };
+
+// console.log(window.confirm("Feel prepared?")); // true or false
+
+// var question = ("50" === 50);
+// console.log(question);
+
+// var question2 = (true && false);
+// console.log(question2);
+
+// var question3 = (true || false);
+// console.log(question3);
+
+// // VAR price = 35.6; <-- WRONG
+// var price = 35.6; // <-- RIGHT
+
+// var city = "London";
+
+// if (city.toLowerCase() === "london") {
+// console.log("I live there too!");
+// } else {
+// console.log("I dont know where that is.")
+// }
+
+// var userName = window.prompt("Please enter your name:");
+// greetUser(userName);
+
+// var radius = window.prompt("Please enter circle radius:");
+// calcCirc(radius);
+
+// var testNum = window.prompt("Number to test for even:");
+// isEven(testNum);
+
+// function greetUser(userName) {
+// alert("Hello " + userName + " welcome to the page");
+// }
+
+// function calcCirc(radius) {
+// var Circ = ((2 * Math.PI) * radius).toFixed(2);
+// alert("Circumference is: " + Circ + " Inches.");
+// }
+
+// function isEven(number) {
+// if (number % 2 == 0) {
+// console.log(number + " is even");
+// } else {
+// console.log(number + " is odd");
+// }
+// }
+
+// NUMBER GUESSING GAME
+// var randomNum = Math.floor((Math.random() * 100) + 1);
+// console.log("Random Number: " + randomNum);
+
+// var userGuess;
+// do {
+// var input = window.prompt("Guess a number from 1-100: ");
+// if (input === null) {
+// window.alert("Game cancelled.");
+// break;
+// }
+
+// userGuess = parseInt(input, 10);
+// if (isNaN(userGuess) || userGuess < 1 || userGuess > 100) {
+// window.alert("Please enter a valid number between 1 and 100.");
+// } else if (userGuess !== randomNum) {
+// window.alert("Incorrect number, try again!");
+// }
+// } while (userGuess !== randomNum);
+
+// if (userGuess === randomNum) {
+// window.alert("You guessed the right number! The number was " + randomNum);
+// }
+
+// ROCK PAPER SCISSORS GAME
+// var choices = ["rock", "paper", "scissors"];
+// var compChoice = choices[Math.floor(Math.random() * 3)];
+// console.log("Computer choice: " + compChoice);
+
+// var userChoice = window.prompt("Enter rock, paper or scissors: ").toLowerCase();
+// console.log("User choice: " + userChoice);
+
+// if (!choices.includes(userChoice)) {
+// window.alert("Invalid choice!");
+// } else if (userChoice === compChoice) {
+// window.alert("It's a tie!");
+// } else {
+// var winsAgainst = {
+// rock: "scissors",
+// paper: "rock",
+// scissors: "paper"
+// };
+
+// if (winsAgainst[userChoice] === compChoice) {
+// window.alert("You win!");
+// } else {
+// window.alert("Computer wins!");
+// }
+// }
+
+// SAMPLE BANK ACCOUNT
+// var bankBalance = 0;
+// console.log("Bank balance: $" + bankBalance);
+
+// function getAmount(message) {
+// var input = window.prompt(message);
+// if (input === null) return null;
+// var amount = parseInt(input, 10);
+// if (isNaN(amount)) {
+// window.alert("Please enter a valid number.");
+// return null;
+// }
+// return amount;
+// }
+
+// while (true) {
+// var userChoice = window.prompt(
+// "Welcome! Your bank balance is: $" + bankBalance +
+// ". Would you like to (w)ithdraw, (d)eposit or (v)iew balance, or (q)uit?");
+// if (userChoice === null || userChoice.toLowerCase() === "q") break;
+// userChoice = userChoice.toLowerCase();
+// console.log(userChoice);
+
+// if (userChoice === "w" || userChoice === "withdrawl") {
+// var widthdrawlAmount = getAmount("How much would you like to widthdraw?");
+// if (widthdrawlAmount === null) continue;
+// if (widthdrawlAmount > bankBalance) {
+// window.alert("Not enough in balance to widthdraw, sorry!");
+// } else if (widthdrawlAmount <= 0) {
+// window.alert("Cannot widthdraw negative or 0 dollars.");
+// } else {
+// bankBalance -= widthdrawlAmount;
+// console.log("Bank balance: $" + bankBalance);
+// }
+// } else if (userChoice === "d" || userChoice === "deposit") {
+// var depositAmount = getAmount("How much would you like to deposit?");
+// if (depositAmount === null) continue;
+// if (depositAmount <= 0) {
+// window.alert("Cannot deposit negative or 0 dollars.");
+// } else {
+// bankBalance += depositAmount;
+// console.log("Bank balance: $" + bankBalance);
+// }
+// } else if (userChoice === "v" || userChoice === "view") {
+// window.alert("Your balance is: $" + bankBalance + " dollars. Thank you for banking with us!");
+// console.log("Bank balance: $" + bankBalance);
+// } else {
+// window.alert("Invalid choice, please try again");
+// }
+// }
+
+// ARRAY STATS CALCULATOR
+// var stats = [];
+// var sum = 0;
+
+// for (var i = 0; i < 50; i++) {
+// var randomNum = Math.floor(Math.random() * 50);
+// sum += randomNum;
+// stats.push(randomNum);
+// console.log(randomNum);
+// }
+// console.log(stats);
+
+// console.log("Sum of stats: " + sum);
+// console.log("Average of stats: " + (sum / stats.length));
+// console.log("Min of stats: " + Math.min(...stats));
+// console.log("Max of stats: " + Math.max(...stats));
+
+// PASSWORD STRENGTH CHECKER
+var userPass = window.prompt("Enter a password to test: ");
+var charCount, numCount, symCount;
+
+charCount = userPass.length;
+console.log(charCount);
+
+numCount = (userPass.match(/\d/g) || []).length;
+console.log(numCount);
+
+symCount = (userPass.match(/[^a-zA-Z0-9]/g) || []).length;
+console.log(symCount);
+
+if (charCount >= 10 && numCount >= 3 && symCount >= 1) {
+ window.alert("Your password is STRONG");
+} else if (charCount >= 10 && numCount >= 1) {
+ window.alert("Your password is OKAY");
+} else {
+ window.alert("Your password is WEAK");
+>>>>>>> a2ad5843006c62096be10203d3f91faa39f365fb
}
\ No newline at end of file
diff --git a/INFO-1272 (JS 1)/Notes/Week 1/index.html b/INFO-1272 (JS 1)/Notes/Week 1/index.html
index 5e84ced..8e4f2eb 100644
--- a/INFO-1272 (JS 1)/Notes/Week 1/index.html
+++ b/INFO-1272 (JS 1)/Notes/Week 1/index.html
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
@@ -31,4 +32,39 @@
+=======
+
+
+
+ Week 1 Class 1
+
+
+