The Save Transaction button depicted in the screen attached is used to save relevant data to the sales table and the salesdetails tables from the depicted schema. When this button is clicked it calls the saveTransaction() function that is within the PosDAO class, it passes to this function an ArrayList of salesdetails object, this list contains the data entered into the jTable which is the products and qty being sold.
Write the saveTransaction function. You are to loop through the items and get the total sales, next you are to insert the current date and the total sales into the sales table. Reminder that the sales table SalesNumber field is set to AUTO-INCREMENT, hence the reason for only entering the total sales and current date in sales table.
Trending nowThis is a popular solution!
Step by stepSolved in 3 steps
- TechPreferences Object: let user TechPreferences = { preferred Database: "MongoDB", backendFrameworks: ["Express.js", "Django"], frontend Frameworks: ["React", "Angular", "Vue.js"], mobileFrameworks: ["Flutter", "React Native"], preferredIDE: "VS Code", continuousIntegration: true, }; Write a JavaScript function to process the information in "userTechPreferences" and answer the following: Display the person's preferred database. Identify and display any backend frameworks used by the person. Output the frontend frameworks the person is familiar with. Create a list of mobile frameworks the person is interested in. Display the preferred Integrated Development Environment (IDE). Check if the person uses continuous integration and display the corresponding message.arrow_forwardJavascript createSelectOptions function The function createSelectOptions should exist. The function createSelectOptions returns undefined if no data parameter is provided. The function createSelectOptions returns an array. The function createSelectOptions returns an array with the correct length. The function createSelectOptions returns an array of option elements. The function createSelectOptions assigns the related user id to the value attribute of the options elements. The function createSelectOptions assigns the related user name to the textContent attribute of the options elements. createSelectOptionsa. Test users JSON data available here: https://jsonplaceholder.typicode.com/usersb. For testing (not in function) you may want to define users with the test data.c. Receives users JSON data as a parameterd. Returns undefined if no parameter receivede. Loops through the users dataf. Creates an option element for each user with document.createElement()g. Assigns the…arrow_forwardpizzaStats Assignment Description For this assignment, name your R file pizzaStats.R For all questions you should load tidyverse and lm.beta. You should not need to use any other libraries. Load tidyverse with suppressPackageStartupMessages(library(tidyverse)) Load lm.beta withsuppressPackageStartupMessages(library(lm.beta)) Run a regression predicting whether or not wine was ordered from temperature, bill, and pizza. Assign the coefficients of the summary of the model to Q1. The output should look something like this: Estimate Std. Error z value Pr(>|z|)(Intercept) -1.09 1.03 -1.06 0.29temperature -0.04 0.01 -3.20 0.00bill 0.03 0.01 3.75 0.00pizzas 0.19 0.06 3.27 0.00 Here is the link of the pizza.csv https://drive.google.com/file/d/1_m2TjPCkPpMo7Z2Vkp32NiuZrXBxeRn6/view?usp=sharingarrow_forward
- mysql> DESC bookauthor; mysql> DESC author; mysql> DESC book; | Field | Туре | Field | Туре | Field Тур | int(11 | varchai author_order | int(11 royaltyshare | decima: author_id isbn | author_id | int(1: | ssn lastname | firstname | varch: | phone | address | city | state | zip | varch: | varch: isbn var I name | type pub_id I price | advance I ytd_sales I pubdate var var | varch: | varch: | varch: | varch: | varch: | int dec | dec int mysql> DESC bookeditor; | dat | Field | Туре mysql> DESC editor; mysql> DESC publisher; editor_id | int(11) | varchar(1 | Field isbn | Field | Туре editor_id ssn pub_id | int(11) | varchar(40) varchar(40) varchar(20) varchar(2) lastname name firstname address | phone editor_position salary | city statearrow_forwardIN java YOUR TASK IS TO IMPLEMENT A JAVA APPLICATION WHICH WILL FUNCTION AS A TYPE OF STUDENT REGISTRATION DATABASE WHICH WILL ENABLE AN ADMINISTRATIVE USER TO EITHER CREATE OR DELETE A STUDENT ACCOUNT IN THE DATABASE IN ORDER TO STORE THE FOLLOWING DETAILS:- (1)THE STUDENT’S NAME, (4) THE STUDENT’S ID NUMBER, (3) A LIST OF THE COURSES WHICH THE STUDENT HAS TAKEN ALONG WITH THE CORRESPONDING GRADES FOR THESE COURSES. NOTE: WHEN THE VALUE -1 IS ENTERED, THE APPLICATION WILL TERMINATE. please check the attached imagearrow_forwardStatus: A Moving to the next question prevents changes to this answer. Question 15 Write the C function that will create an instance of the structure for the dynamic array defined below and initialize the fields in the structure to reflect than space for 20 values have been allocated in the dynam The function's parameter must match the call shown below. typedef struct dynArrStruct int* int int /* pointer to the dynamic array / amount of space currently allocated for the dynamic array */ 1* number of values currently stored in the dynamic array arr; allocated; inuse; } dynArr; */ void main(){ dynArr *al; al = create (); /* write the function to match this call */ For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac). BIUS Preformatted *O自Q Terminal 10pt AV E E E E 田 田田 田田田図 因田田 Ť {} dynArrStruct create(unsigned n){ dynArrStruct* matrix; matrix = malloc(sizeof(matrix)); matrix->allocated%-Dn%3; matrix->inUse%3D0%3B matrix->arr=malloc(sizeof(int *)*n); for (int…arrow_forward
- Using the getSales() function as a reference, create a function thatt will take one parameter (string code) which is a product code (or part thereof), and when the search button is pressed, all sales that include this product code (or part thereof) will be displayed in the jTable. The date boxes in the GUI will be replaced with a text box. The schema of the database where the queries are being used is also attached. public List<Pos> getSales(String fromDate, String toDate){ List<Pos> salesList = new ArrayList<>(); try { String query = "SELECT sales_date, sales_number, prod_code, prod_name, unit_cost, quantity, sales_total " + "FROM Sales, SalesDetails, Product " + "WHERE Sales.sales_number = SalesDetails.sales_number " + "AND SalesDetails.prod_code = Product.prod_id " + "AND sales_date BETWEEN ? AND ?"; PreparedStatement stmt =…arrow_forwardAssignment 1 University Library SystemIn this assignment you are going to implement your own version of university library system,The system will have two different sides , the first one is to help the librarian to do his job and the other side for admin to manage every one permissions in the system , so You should provide the following features in your system: Admin viewo Add/remove Studentso Add/remove librariano Add/remove other admins Librarian viewo Add/Delete bookso Issue/Return bookso View bookso View Issued bookso Log in /log outo Search for the book(id/name) Simple backend for your system , You could use a file each row should represent item o Books File should be something like:Id , Book Name, Author Name, Available quantity, Issued Quantity 1,Oliver Twist, Charles Dickens,98,2In the previous the first row was the name of each column , you can do that orhandle it in your code , id =1 , Book Name =Oliver Twist ..Etc. Tables neededo Books Id Book Name Author Name…arrow_forwardData structures unique_values(a_dict:dict)-> dict This function will receive a single dictionary parameter known as a_dict. a_dict will contain a single letter as a string and numbers as values. This function is supposed to search a_dict to find all values that appear only once in the a_dict. The function will create another dictionary named to_ret. For all values that appear once in a_dict the function will add the value as a key in to_ret and set the value of the key to the key of the value in a_dict (swap the key-value pairs, since a_dict contains letters to numbers, to_ret will contain Numbers to Letters). Finally, the function should return to_ret. Example: a_dict: {'X': 2, 'Y': 5, 'N': 2, 'L': 2, 'W': 1, 'G': 0, 'R': 1} Expected: {5: 'Y', 0: 'G'} a_dict: {'Z': 3, 'P': 3, 'E': 2, 'G': 0, 'T': 5, 'L': 1, 'Q': 0} to_ret: {2: 'E', 5: 'T', 1: 'L'} a_dict: {'E': 3, 'X': 3} to_ret: {} a_dict: {'G': 3, 'D': 3, 'C': 4, 'Q': 1, 'H': 1, 'M': 2, 'Z': 1, 'W': 3} to_ret: {4: 'C', 2: 'M'}…arrow_forward
- please write in C++.arrow_forward### THE DATA mun_dict = { '@CityofCTAlerts' : 'Cape Town', '@CityPowerJhb' : 'Johannesburg', '@eThekwiniM' : 'eThekwini' , '@EMMInfo' : 'Ekurhuleni', '@centlecutility' : 'Mangaung', '@NMBmunicipality' : 'Nelson Mandela Bay', '@CityTshwane' : 'Tshwane'} twitter_url = 'https://raw.githubusercontent.com/Explore-AI/Public-Data/master/Data/twitter_nov_2019.csv'twitter_df = pd.read_csv(twitter_url)twitter_df.head() ### QUESTION Municipality & Hashtag Detector Write a function which takes in a pandas dataframe and returns a modified dataframe that includes two new columns that contain information about the municipality and hashtag of the tweet. Function Specifications: Function should take a pandas dataframe as input. Extract the municipality from a tweet using the mun_dict dictonary given at the start of the notebook and insert the result into a new column named 'municipality' in the same dataframe. Use the entry np.nan when a municipality is not found. Extract a…arrow_forwardUnique Values This function will receive a single map parameter known as a_map. a_map will contain a single letter as a string and numbers as values. This function is supposed to search a_map to find all values that appear only once in a_map. The function will create another map named to_ret. For all values that appear once in a_map the function will add the value as a key in to_ret and set the value of the key to the key of the value in a_map (swap the key-value pairs, since a_map contains letters to numbers, to_ret will contain Numbers to Letters). Finally, the function should return to_ret. Signature: public static HashMap<String, Integer> uniqueValues(HashMap<Integer, String> a_map) Example: INPUT: {0=M, 2=M, 3=M, 5=M, 6=n, 7=M, 9=M}OUTPUT: {n=6} INPUT: {0=A, 1=c, 2=c, 4=c, 5=a, 8=Q, 9=c}OUTPUT: {A=0, a=5, Q=8}arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education