40 likes | 60 Views
PRG 421 Week 5 Individual Week Five Coding Assignment//tutorfortune.com<br><br>Click on below link to buy<br>https://tutorfortune.com/products/prg-421-week-5-individual-week-five-coding-assignment<br><br>PRG 421 Week 5 Individual Week Five Coding Assignment<br><br>Resource:<br><br> <br><br>u201cStarter Code to Access Tables via JDBCu201d text file<br><br>For this assignment, you will create Javau2122 code that accesses a relational database, requests data, and then analyzes and displays a portion of that data.<br><br> <br><br>Imagine a MySQL relational database schema named COMPANY_DB containing two tables, employee_table and payroll_table, such that the records in each of the tables is as follows:<br><br>Emp id<br>FName<br>LNname<br>Addr<br>City<br>State<br>Zip<br>100<br>Jack<br>Smith<br>123 North<br>Topeka<br> KS<br>66603<br>101<br>Joe<br>Apple<br>4 Street<br>Denver<br>CO<br>80202<br>111<br>Nancy<br>Good<br>45 SW<br>Hartford<br>CT<br>06103<br>121<br>Tom<br>Whatever<br>89 NE<br>Dover<br>DE<br>19901<br>122<br>Jim<br>Thompson<br>789 W 95<br>Albany<br>NY<br>12207<br>123<br>Tommy<br>Boyson<br>154 Bolt<br>Boston<br>MA<br>02201<br>125<br>John<br>Jones<br>47 West<br>Lincoln<br>NE<br>68502<br> <br>Emp id<br>Paysch<br>401k<br>Spouse<br>100<br>BiWk<br>yes<br>yes<br>101<br>BiWk<br>yes<br>yes<br>111<br>Monthly<br>no<br>no<br>121<br>Wkly<br>pending<br>yes<br>122<br>Wkly<br>yes<br>no<br>123<br>Monthly<br>pending<br>no<br>125<br>Monthly<br>no<br>yes<br> <br><br>The credentials you will need to access the database which holds both of the tables are as follows:<br><br> <br><br>Host string = localhost:3306<br><br>Username = student<br><br>Password = prg421<br><br>Copy and paste the linked Javau2122 u201cstarteru201d code into the NetBeans editor and save as a JAVA file.<br><br> <br><br>Add Javau2122 statements to the file to accomplish the following:<br><br> <br><br>Establish a connection to the database<br><br>Query the database, joining the two tables on the Emp_id field<br><br>Display your name and todayu2019s date on the console along with the following returned database results:<br><br>employee identification number<br><br>first and last name<br><br>state<br><br>payroll schedule<br><br>401k plan<br><br>Close the database connection<br><br>Identify and correct any compile-time errors that exist in the starter code.<br><br> <br><br>Note: Because you will not be connecting to an actual database, some compiler errors will remain.<br><br> <br><br>After you finish, rename your JAVA file with a .txt extension using the following naming convention:<br><br> <br><br>PRG421_Week5CodingAssignment_LastnameFirstname.txt.<br><br>Submit your TXT file to the Assignment Files tab.<br> PRG 421 Week 5 Individual Week Five Coding Assignment<br>Click on below link to buy<br>https://tutorfortune.com/products/prg-421-week-5-individual-week-five-coding-assignment<br><br>
E N D
PRG 421 Week 5 Individual Week Five Coding Assignment//tutorfortune.com Click on below link to buy https://tutorfortune.com/products/prg-421-week-5-individual-week-five-coding- assignment P R G 4 2 1 We e k 5 I n d i v i d u a l We e k F i v e C o d i n g A s s i g n me n t R e s o u r c e : “ S t a r t e r C o d e t o A c c e s s T a b l e s v i a J D B C ” t e x t fi l e F o r t h i s a s s i g n me n t , y o u w i l l c r e a t e J a v a ™ c o d e t h a t a c c e s s e s a r e l a t i o n a l d a t a b a s e , r e q u e s t s d a t a , a n d t h e n a n a l y z e s a n d d i s p l a y s a p o r t i o n o f t h a t d a t a . I ma g i n e a My S Q L r e l a t i o n a l d a t a b a s e s c h e ma n a me d C O MP A N Y _ D B c o n t a i n i n g t w o t a b l e s , e mp l o y e e _ t a b l e a n d p a y r o l l _ t a b l e , s u c h t h a t t h e r e c o r d s i n e a c h o f t h e t a b l e s i s a s f o l l o w s : E mp i d F N a me L N n a me A d d r C i t y S t a t e Z i p 1 0 0 J a c k S mi t h 1 2 3 N o r t h T o p e k a K S 6 6 6 0 3 1 0 1 J o e A p p l e 4 S t r e e t D e n v e r C O 8 0 2 0 2 1 1 1 N a n c y G o o d 4 5 S W H a r t f o r d C T
0 6 1 0 3 1 2 1 T o m Wh a t e v e r 8 9 N E D o v e r D E 1 9 9 0 1 1 2 2 J i m T h o mp s o n 7 8 9 W 9 5 A l b a n y N Y 1 2 2 0 7 1 2 3 T o mmy B o y s o n 1 5 4 B o l t B o s t o n MA 0 2 2 0 1 1 2 5 J o h n J o n e s 4 7 We s t L i n c o l n N E 6 8 5 0 2 E mp i d P a y s c h 4 0 1 k S p o u s e 1 0 0 B i Wk y e s y e s 1 0 1 B i Wk y e s y e s 1 1 1 Mo n t h l y n o n o 1 2 1 Wk l y p e n d i n g y e s
1 2 2 Wk l y y e s n o 1 2 3 Mo n t h l y p e n d i n g n o 1 2 5 Mo n t h l y n o y e s T h e c r e d e n t i a l s y o u w i l l n e e d t o a c c e s s t h e d a t a b a s e w h i c h h o l d s b o t h o f t h e t a b l e s a r e a s f o l l o w s : H o s t s t r i n g = l o c a l h o s t : 3 3 0 6 U s e r n a me = s t u d e n t P a s s w o r d = p r g 4 2 1 C o p y a n d p a s t e t h e l i n k e d J a v a ™ “ s t a r t e r ” c o d e i n t o t h e N e t B e a n s e d i t o r a n d s a v e a s a J A V A fi l e . A d d J a v a ™ s t a t e me n t s t o t h e fi l e t o a c c o mp l i s h t h e f o l l o w i n g : E s t a b l i s h a c o n n e c t i o n t o t h e d a t a b a s e Q u e r y t h e d a t a b a s e , j o i n i n g t h e t w o t a b l e s o n t h e E mp _ i d fi e l d D i s p l a y y o u r n a me a n d t o d a y ’ s d a t e o n t h e c o n s o l e a l o n g w i t h t h e f o l l o w i n g r e t u r n e d d a t a b a s e r e s u l t s : e mp l o y e e i d e n t i fi c a t i o n n u mb e r fi r s t a n d l a s t n a me s t a t e p a y r o l l s c h e d u l e 4 0 1 k p l a n C l o s e t h e d a t a b a s e c o n n e c t i o n
I d e n t i f y a n d c o r r e c t a n y c o mp i l e - t i me e r r o r s t h a t e x i s t i n t h e s t a r t e r c o d e . N o t e : B e c a u s e y o u w i l l n o t b e c o n n e c t i n g t o a n a c t u a l d a t a b a s e , s o me c o mp i l e r e r r o r s w i l l r e ma i n . A f t e r y o u fi n i s h , r e n a me y o u r J A V A fi l e w i t h a . t x t e x t e n s i o n u s i n g t h e f o l l o w i n g n a mi n g c o n v e n t i o n : P R G 4 2 1 _ We e k 5 C o d i n g A s s i g n me n t _ L a s t n a me F i r s t n a me . t x t . S u b mi t y o u r T X T fi l e t o t h e A s s i g n me n t F i l e s t a b . P R G 4 2 1 We e k 5 I n d i v i d u a l We e k F i v e C o d i n g A s s i g n me n t Click on below link to buy https://tutorfortune.com/products/prg-421-week-5-individual-week-five-coding- assignment