Assignment 2: Database and Multithread Programming

    Need Solution - Download from here



     

    Task

    Task 1 ( 60 marks)

    University grading system maintains number of tables to store, retrieve and manipulate student marks. These tables reside in a centrally or locally located server known as ‘GradeProcessing’. ‘ITC521’ is one of the tables which contains following information/attributes for all the students enrolled in ITC521: “StudentID”, “StudentName”, “Quiz”, “Assignment1”, “Assignment2”, “Assignment3”, “Exam”, “Results” and “Grade”. A sample of the table may look like as follows:

    StudentID StudentName Quiz Assignment1 Assignment2 Assignment3 Exam Results Grade
    11111111 X 100 85 100 90 90 91.75 HD
    22222222 Y 100 60 80 80 75 75.5 DI

    Write a JAVA program that would perform following tasks: 

    Create Table: Create a table that is capable to store above information.
    Insert Record: If the user of your program wants to insert a record, your program should ask for all the fields of the record and insert them in the table.
    Search: The user of your program should be able to search a particular record by ID or any other field.
    Update: The user of your program should be able to update any field/s of a particular record. The record in which the update operation needs to be done will be selected by Student ID.
    Calculate Results: The results of a student should be calculated using the following formula:  Results = (Quiz * 0.05)+(Assignment1 * 0.15) +(Assignment2 * 0.2) + (Assignment3 * 0.10) + (Exam * 0.5)
    Calculate Grade:

    HD: Results>=85
    DI: 75<=Results<85
    CR: 65<=Results<75
    PS: 50<=Results<65
    FL: 75<=Results<50
     

     Note that Student ID must be 8-digit number, assignment and exam Marks must be integers between 0 and 100 (inclusive), and Results must be floating-point numbers with two decimal places.


    Task 2 (40 marks)

    Write a JAVA program that would simulate traffic lights using the concept of Multithreading. One example is shown in the following figure. Each light has two statuses, “on” amd “off”. Moreover, the time of each light switching status can be set using the text input box beforehand. If the user clicks on the “Start” button, the program starts to work. While if the “End” button is clicked, the program stops working but not terminates. The program terminates only when the “X” button on right-upper corner. Please note that, initially the switching time for each light would be set to “3”. As shown in the last column of following fiure, you should also display the text indicating the status of traffic light.

    Note: For further clarification and concerns about the assignment, students are recommended to contact with the subject coordinator at rulusoy@studygroup.com

    Rationale

    This assignment is designed to asses following learning outcomes:

    – be able to create, connect to and update a relational database using the Java Database Connectivity (JDBC);
    – be able to design and implement multithreaded Java applications;
    – be able to work on JavaFX UI Controls and Multimedia

    Marking criteria

    Task 1

    Items Full Marks PS CR DI HD
    Presentation 10  Very basic presentation (no screen shots are included)  Report with few screen shots is submitted  Report with enough screen shots is submitted Report with enough screen shots is submitted. The discussion on each screen shot is easy to read and understand.
    Create Table 10 A table is created but provides no error/warning message  Any error/warning is handled  Program checks the validation of the fields before sending the query to the MySQL  Some suggestions about fields and table creation confirmation message is displayed
    Insert Record 10  A record is inserted but provides no error/warning message  Any error/warning is handled  Program checks the validation of the fields before
    inserting a record in the table
     Some suggestions about fields and insertion confirmation message is displayed
    Search 10  A record is searched correctly but provides no error/warning message  Any error/warning is handled  Program checks the validation of the field to be searched before running search operation in the table  Some suggestions about fields and all search results are displayed
    Update 10 A record is updated correctly but provides no error/warning message Any error/warning is handled Program checks the validation of the field  before running update operation in the table Some suggestions about fields and all updated results are displayed
    Calculate Results and Grade 10  There are some mistakes in calculating results and grade  Results and Grades are calculated properly  All error/warning message is properly handled 

    Task 2

    Items Full Marks PS CR DI HD
    Presentation 5  Very basic presentation (no screen shots are included)  Report with few screen shots is submitted Report with enough screen shots is submitted Report with enough screen shots is submitted. The discussion on each screen shot is easy to read and understand.
    Lights switch the status on their own. 15 There are some errors in switching the statuses
    of all the lights
    No error in showing the
    status itself. However the
    interface is not fully clear to the user.
    The status of corresponding light switches perfectly and is displayed in text and graphics.
    A user can adjust the switching time of lights using the input text field.
     
    20  There are some errors in showing the actual statuses
    of all the lights
     No error in showing the
    status itself. However the
    interface is not fully clear to the user.
    A user can adjust the switching time of lights properly using the input text filed. The statuses of the lights are displayed clearly both in text and graphics.

    Presentation

    Following items are to be submitted in the Turnitin (For each task):

    Report: The report (in .doc or .pdf format) should explain how to run your program (1 or 2 page long) and any settings needed to run your program. Enough number of screenshots should be shown in the document. In case if the assignment marker fails to run your program, because of any inconvenience, these screenshots would show how the program worked on your machine/environment.
    Source code and other files: All source codes, exe file and other relevant files must have to be zipped in a folder such that unzipping would keep the file/folder structure unaffected.
     

    You can order this assignment from our service and receive a completely high-quality custom paper. Our service offers any of the academic papers written from scratch, according to all customers’ specifications, expectations and highest standards.”

     

    Leave A Comment