Simulate traffic lights using the concept of multithreading

Assignment Help JAVA Programming
Reference no: EM132131722

Assessment: Database and Multithread Programming

Task

Task 1: Grade Processing

University grading system maintains a database called "GradeProcessing" that contains number of tables to store, retrieve and manipulate student marks. ‘Java2' is one of the tables which contains following information/attributes for all the students enrolled in "Java2":

A sample of the table may look like as follows:

 

ID

StudentName

Quiz

A1

A2

A3

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 Graphical User Interface (GUI) 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 ID.
- Calculate Results: The results of a student should be calculated using the following formula: Results = (Quiz * 0.05)+(A1* 0.15) +(A2* 0.2) + (A3* 0.10) + (Exam * 0.5)
- Calculate Grade:
HD: Results>=85
DI: 75<=Results<85
CR: 65<=Results<75
PS: 50<=Results<65
FL: Results<50
Note that ID must be 8-digit number, A1, A2, A3 and Exam Marks must be between 0 and 100 (inclusive), and Results must be floating-point numbers with two decimal places.

Task 2: Traffic light simulation

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.

Attachment:- Assessment.rar

Reference no: EM132131722

Questions Cloud

Explain why the absence of water halts photosynthesis : Also, cells that use aerobic cellular respiration, like humans, do not produce ATP at normal levels without oxygen gas. Discuss why this is so.
Diffusion and osmosis question : In your large intestine, the water from the food you have eaten needs to be kept in the body to prevent dehydration. Therefore the high concentration of water
What is the best description of system : A suspension is formed from uniform particles of solid, of diameter 10 Mm, suspended in a solvent. What is the best description of this system?
Independent and dependent variable : Alice's hypothesis' would be that DoubleMint will last the longest.So, what is the control group, the independent and dependent variable, and controlled variabl
Simulate traffic lights using the concept of multithreading : 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
Available to living things : Why, chemically, is nitrogen not more available to living things? I am looking for the simple chemical reason here
What are 2 applications that would be candidates for : What are 2 applications that would be candidates for that, and illustrate strategies/methodologies to accomplish that.
What can you do to set a storage limit for users : When setting quotas for disk space, what are the two tools for enabling and configuring quotas? And which of the two are the more flexible?
Percentage of the offspring that will be heterozygous : In a cross between two heterozygous (Aa) individuals, what is the likely percentage of the offspring that will be heterozygous

Reviews

Write a Review

JAVA Programming Questions & Answers

  World data query system - determine users desired continent

CS1110 World Data Query System - alls getContinent to determine user's desired continent. Searches data to find ALL matching countries in that target continent

  Given an aerodynamic body you have learned in aerodynamics

given an aerodynamic body you have learned in aerodynamics and flight mechanics how to apply the numerical source panel

  Explain the java language and why we use it

Explain the Java Language and why we use it. List the pieces in association with the J2EE architecture and elaborate on what each piece does.

  Write a complete java program assuming that the variables gp

Write a complete java program Assuming that the variables gpa, deanList and studentName have been declared, you should read in the studentName and gpa from keyboard. Write an if statement that adds 1 to deansList and prints studentName to the standar..

  Statement that catches and handles invalid data

Then, code a constructor that assigns default values to these variables. The default value you assign to the customer variable should prevent a NullPointerException - The parameters of this constructor should be given the same names as the instance..

  Determine the number of quarters

You have an amount of change (such as 41 cents or 72 cents) and you want to figure out how many quarters, dimes, nickels and pennies that is. Your change will always be an integer value between 0 and 99.

  Inheritancedemo

Create a New Project named InheritanceDemo . 2. Create a new class called Person and cut and paste the Person.java file from Blackboard into the class. Create a new class called Student and cut and paste the Student.java file from Blackboard into the..

  Write program in java that solves system of linear equations

Write a program in java that solves system of linear equations. Users should be able to input the number of variables.

  Create unique three-graphic scene composed of opengl graphic

In this project you will create a unique 3 graphics scene composed of OpenGL graphic components using transformation methods.

  Develop class which implements interface

Let the ADT called SquareMatrix. (The matrix can be represented by 2-D array of ints w/ n rows and n columns.) Write specification for ADT as Java interface. Develop the class which implements interface.

  Determine whether a given credit card number is valid or not

Implement Luhn's algorithm in a program to determine whether a given credit card number is valid or not. You must test if the number of digits in the input is in the valid range (13 to 16), run Luhn's algorithm to test its validity.

  Write a program that assigns seats on an airplane

Prepare a program that teaches arithmetic to a young child. The program tests subtraction and addition. Write a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd