Module2_CodeReflection_and_FlowChart
.docx
keyboard_arrow_up
School
Southern New Hampshire University *
*We aren’t endorsed by this school
Course
CS-210
Subject
Computer Science
Date
Feb 20, 2024
Type
docx
Pages
3
Uploaded by CoachTree4507
2-3 Assignment: Linked Lists
Zachary Bowen
Department of Computer Science, Southern New Hampshire University
CS-300-H2987 DSA: Analysis and Design 23EW2
Professor David Ostrowski
October 31, 2023
Linked List Assignment
The requirements for the assignment were to create a menu with these items.
1. Enter a Bid
2. Load Bids
3. Display All Bids
4. Find Bid
5. Remove Bids
9. Exit We were given 5 main files, LinkedList.cpp, CSVparser.cpp, CSVparser.hpp and two .csv files.
Labeled within the LinkedList.cpp were sections where we were to code functionality for the above menu. This assignment was much more difficult than the previous assignment. There were some
quirks that I needed help figuring out why that was happening. If I loaded the bids by Item number 2, pressed again it doubled the number of bids. Another learning was that I should not hard code the find bid, the functionality should be a request for the bidId or bidkey and then do the search and print result. One more learning even though we were instructed to have no output for Item Number 5, there really should be a prompt for the user to enter the ID number, and confirm that it was
removed.
This project was straightforward working in tandem with the exercises from Zybooks. Most of my troubleshooting time was on Visual Studio 2019 itself.
Linked List Flow Chart
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Related Questions
assume that a database has a table named Stock, with thefollowing columns:Column Name TypeTrading_Symbol nchar(10)Company_Name nchar(25)Num_Shares intPurchase_Price moneySelling_Price money Write a Select statement that returns the Trading_Symbol column and the Num_ Shares column only from the rows where Selling_Price is greater than Purchase_ Price and Num_Shares is greater than 100. The results should be sorted by the Num_Shares column in ascending order.
arrow_forward
Assume that a database has a table named Stock, with the following columns:Column Name TypeTrading_Symbol nchar(10)Company_Name nchar(25)Num_Shares intPurchase_Price moneySelling_Price money
Write a Select statement that returns the Trading_Symbol column and the Num_Shares column only from the rows where Selling_Price is greater than Purchase_Price and Num_Shares is greater than 100. The results should be sorted by the Num_Shares column in ascending order.
arrow_forward
assume that a database has a table named Stock, with thefollowing columns:Column Name TypeTrading_Symbol nchar(10)Company_Name nchar(25)Num_Shares intPurchase_Price moneySelling_Price money Write a Select statement that returns only the Trading_Symbol column from every row in the table.
arrow_forward
A social media application stored information about each registered user in the table
create table user (id int primary key auto_increment, name varchar(100) not null)
A user can have many "friends" and can also be a "friend" to many other users. Specify how this
relationship would be implemented by coding the create table statement(s) for the tables.
arrow_forward
calculate_new_balance
Given a starting balance (a number), and a list of transaction tuples, calculate the final balance for an account. Transaction tuples are of the shape ("description", amount, "withdrawal") , or ("description", amount, "deposit"). The last entry in the tuple will be either "withdrawal" or "deposit". Every withdrawal decreases the balance of the account by the specified amount, and every deposit increases the balance. The return value is the new account balance, as a number. (which could be negative)
Sample calls should look like:
>>> calculate_new_balance(100, [("payday", 20, "deposit"), ("new shoes", 50, "withdrawal"), ("illicit winnings", 200, "deposit")])270>>> calculate_new_balance(100, [])100
arrow_forward
Create Trigger for
When a student marks are being inserted, if the marks that are inserted are greater than 50, allow the insertion, but update marks to 50.
Marks(Id , Marks) -> Table
Fill in the blanks:
___ triggerName
Before ___ ON Marks
REFERENCING
_____ AS nrow
FOR EACH ROW
WHEN (nrow.marks>50)
_____ nrow SET nrow.marks = 50;
arrow_forward
2- selects the order line items (orderNumber, orderlinenumber) fromthe “orderdetails” table. Also, display the subtotal (quantityOrdered * priceEach) for eachline item and sorts the result set based on the subtotal descending .3- Display unique last names from employees table ordered by last name.4- Display customerNumber, customerName and creditLimit for getting the top five customerswho have the highest creditLimit.5- Find customer Name, customer country, sales representative employee number fromcustomers who do not have a sales representative.6- For each order status, display status and count of orders have this status.7- For Each order number in order details table, Display order number, sum of quantityordered (itemsCount) and sum of (priceEach * quantityOrdered) as total. With condition“total” greater than 1000.8- Display product code, product name and text description for product.9- Find customer number, customer name, order status and order number, for customerwith their orders…
arrow_forward
DataBaseMid2021-2.doc [Compatibility Mode] - Word
Sign in
Table Tools
File
Home
Insert
Design
Layout
References
Mailings
Review
View
Help
Design
Layout
O Tell me what you want to do
요 Share
SECOND OUENIVAR
The following Data Base shows some sample data values for an extended form of the Zoo and
Visitors. The significance of Visiting row is that the Visitor visits a specified Zoo in a specified date.
Zoo :
Zno
zi
Visitors :
City
Gaza
Nusirat
Yno
Name
Address
Age
V1
Fuad
Gaza
55
Z2
V2
Rami
Gaza
20
Z3
Gaza
V3
Ahmed
Nusirat
31
V4
Ahmed
Gaza
45
V5
Ali
Rafa
20
Visiting:
Vno
Zno
Z1
Date
V2
11-11-1998
15-10-1999
V1
Z3
11-01-2003
11-01-2003
06-03-1997
V2
Z2
V2
Z3
V1
Z2
V3
Z1
06-031997
V3
Z3
11-11-2005
V4
Z3
11-11-2005
V2
Z2
12-12-2005
Given the following relational Algebra querya
Visitors Þyisitora.Nno = Visiting.VnolIIxna.Znal Visiting) A IIzag [8 City = “Caza' ( Zoo)]1
A- Find the result relation of the above query
B What was the request of the relational algebra query above (make a query…
arrow_forward
Sales Database:
Customers(custId, lastName, firstName, address, phone, creditLimit)
Orders(ordNumber, itemNumber, qtyOrdered.)
Items(itemNumber, itemName, price)
For the Sales Database referenced above, write the SQL command to create the LineItem table, assuming the Orders table and items table already exist.
arrow_forward
help
arrow_forward
If we implement a queue using an array where we treat the array as if its two ends are "taped
together", we call that a linear array.
O True
False
arrow_forward
Assignment Two:
We will write three procedures on our tables,
the first of which I
have provided as an example.
proclnsertPlayer takes one IN VARCHAR(16)
paramater and returns
an error code in the second SMALLINT (INOUT)
parameter.
The procedure checks the parameter and, if
there are no errors,
inserts the value into tblPlayers.
Documentation of errors
Condition
Error code
No errors
1st param Null or zero len
playerID taken
1
proclnsertGame will receive two IN
VARCHAR(16) interpreted as
arrow_forward
Arrange the codes
arrow_forward
Create a list to save the elements and sort the element in ascending or descending order.
void create(SqList *l) //create the list that save the elements
{
}
void insertSort(SqList *l)//insert sort
{
}
void bubbleSort(SqList *l)//bubble sort
{
}
void selectSort(SqList *l)//selection short
{
}
int partition(sqList *p, int low, int high)//a partition in quick sort
{
}
void quickSort(SqList *l, int low, int high)//quick sort
{
}
void display(SqList *l)//display the list
{
}
void main()
{
SqList *L;
}
arrow_forward
For this portion of the lab design the solution in the following manner:
Create a table using a two-dimensional list that stores a Fahrenheit temperature and the equivalent Celsius temperature. Use the following range of Fahrenheit temperatures:Starting at -10 through 100 in increments of 10. Thus, the Fahrenheit temperatures will be:-10, 0, 10, 20, 30, 40, 50…and so on.Display the contents of the list.Similarly create tables/lists for the following, starting at 0 through 100 in increments of 10:Miles to kilometersGallons to litersPounds to kilogramsInches to centimetersDisplay the contents of each listSave the program as firstname_lastname_Lab7a.py where you will replace firstname and lastname with your actual first and last name.
arrow_forward
Select statement urgent
arrow_forward
Bootstrap program for below table
arrow_forward
Assume that a PriorityQueue has following elements: [20, 30, 50, 40]. What will be its contents after we poll (i.e., remove) one element?
arrow_forward
class Database:def __init__(self, db_name):self.db = sqlite3.connect(db_name)self.cursor = self.db.cursor()def create_table(self, table_schema):self.cursor.execute(table_schema)self.db.commit()def insert_data(self, table_name, data):for i in range(len(data)):keys = ", ".join(data.columns)values = ", ".join([f"'{value}'" if pd.isna(value) else str(value) for value in data.iloc[i]])self.cursor.execute(f"INSERT INTO {table_name} ({keys}) VALUES ({values})")self.db.commit()def search_data(self, table_name, year):self.cursor.execute(f"SELECT * FROM {table_name} WHERE year={year}")result = self.cursor.fetchone()if result is not None:return resultelse:return Nonedef delete_data(self, table_name, year):self.cursor.execute(f"DELETE FROM {table_name} WHERE year={year}")self.db.commit()return self.cursor.rowcount > 0
Please rewrite (or convert) the code above with format:
def QueryBuilder( Data_Base, Query_Type, Query_Tuple):'''''' Build Query_String'''''' return Query_String
arrow_forward
1-Write the syntax to insert into a relational table called students the address column references an object table called addresses that was created using an address_type.
Other columns exist in the students table, but you are only inserting into the ones below. Aliases used should be the first letter of the table name, eg students would be s, addresses would be a
Relational Table Name
students
attribute
student_id
attribute
surname
attribute
address
arrow_forward
SEE MORE QUESTIONS
Recommended textbooks for you
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Related Questions
- assume that a database has a table named Stock, with thefollowing columns:Column Name TypeTrading_Symbol nchar(10)Company_Name nchar(25)Num_Shares intPurchase_Price moneySelling_Price money Write a Select statement that returns the Trading_Symbol column and the Num_ Shares column only from the rows where Selling_Price is greater than Purchase_ Price and Num_Shares is greater than 100. The results should be sorted by the Num_Shares column in ascending order.arrow_forwardAssume that a database has a table named Stock, with the following columns:Column Name TypeTrading_Symbol nchar(10)Company_Name nchar(25)Num_Shares intPurchase_Price moneySelling_Price money Write a Select statement that returns the Trading_Symbol column and the Num_Shares column only from the rows where Selling_Price is greater than Purchase_Price and Num_Shares is greater than 100. The results should be sorted by the Num_Shares column in ascending order.arrow_forwardassume that a database has a table named Stock, with thefollowing columns:Column Name TypeTrading_Symbol nchar(10)Company_Name nchar(25)Num_Shares intPurchase_Price moneySelling_Price money Write a Select statement that returns only the Trading_Symbol column from every row in the table.arrow_forward
- A social media application stored information about each registered user in the table create table user (id int primary key auto_increment, name varchar(100) not null) A user can have many "friends" and can also be a "friend" to many other users. Specify how this relationship would be implemented by coding the create table statement(s) for the tables.arrow_forwardcalculate_new_balance Given a starting balance (a number), and a list of transaction tuples, calculate the final balance for an account. Transaction tuples are of the shape ("description", amount, "withdrawal") , or ("description", amount, "deposit"). The last entry in the tuple will be either "withdrawal" or "deposit". Every withdrawal decreases the balance of the account by the specified amount, and every deposit increases the balance. The return value is the new account balance, as a number. (which could be negative) Sample calls should look like: >>> calculate_new_balance(100, [("payday", 20, "deposit"), ("new shoes", 50, "withdrawal"), ("illicit winnings", 200, "deposit")])270>>> calculate_new_balance(100, [])100arrow_forwardCreate Trigger for When a student marks are being inserted, if the marks that are inserted are greater than 50, allow the insertion, but update marks to 50. Marks(Id , Marks) -> Table Fill in the blanks: ___ triggerName Before ___ ON Marks REFERENCING _____ AS nrow FOR EACH ROW WHEN (nrow.marks>50) _____ nrow SET nrow.marks = 50;arrow_forward
- 2- selects the order line items (orderNumber, orderlinenumber) fromthe “orderdetails” table. Also, display the subtotal (quantityOrdered * priceEach) for eachline item and sorts the result set based on the subtotal descending .3- Display unique last names from employees table ordered by last name.4- Display customerNumber, customerName and creditLimit for getting the top five customerswho have the highest creditLimit.5- Find customer Name, customer country, sales representative employee number fromcustomers who do not have a sales representative.6- For each order status, display status and count of orders have this status.7- For Each order number in order details table, Display order number, sum of quantityordered (itemsCount) and sum of (priceEach * quantityOrdered) as total. With condition“total” greater than 1000.8- Display product code, product name and text description for product.9- Find customer number, customer name, order status and order number, for customerwith their orders…arrow_forwardDataBaseMid2021-2.doc [Compatibility Mode] - Word Sign in Table Tools File Home Insert Design Layout References Mailings Review View Help Design Layout O Tell me what you want to do 요 Share SECOND OUENIVAR The following Data Base shows some sample data values for an extended form of the Zoo and Visitors. The significance of Visiting row is that the Visitor visits a specified Zoo in a specified date. Zoo : Zno zi Visitors : City Gaza Nusirat Yno Name Address Age V1 Fuad Gaza 55 Z2 V2 Rami Gaza 20 Z3 Gaza V3 Ahmed Nusirat 31 V4 Ahmed Gaza 45 V5 Ali Rafa 20 Visiting: Vno Zno Z1 Date V2 11-11-1998 15-10-1999 V1 Z3 11-01-2003 11-01-2003 06-03-1997 V2 Z2 V2 Z3 V1 Z2 V3 Z1 06-031997 V3 Z3 11-11-2005 V4 Z3 11-11-2005 V2 Z2 12-12-2005 Given the following relational Algebra querya Visitors Þyisitora.Nno = Visiting.VnolIIxna.Znal Visiting) A IIzag [8 City = “Caza' ( Zoo)]1 A- Find the result relation of the above query B What was the request of the relational algebra query above (make a query…arrow_forwardSales Database: Customers(custId, lastName, firstName, address, phone, creditLimit) Orders(ordNumber, itemNumber, qtyOrdered.) Items(itemNumber, itemName, price) For the Sales Database referenced above, write the SQL command to create the LineItem table, assuming the Orders table and items table already exist.arrow_forward
- helparrow_forwardIf we implement a queue using an array where we treat the array as if its two ends are "taped together", we call that a linear array. O True Falsearrow_forwardAssignment Two: We will write three procedures on our tables, the first of which I have provided as an example. proclnsertPlayer takes one IN VARCHAR(16) paramater and returns an error code in the second SMALLINT (INOUT) parameter. The procedure checks the parameter and, if there are no errors, inserts the value into tblPlayers. Documentation of errors Condition Error code No errors 1st param Null or zero len playerID taken 1 proclnsertGame will receive two IN VARCHAR(16) interpreted asarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageA Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr