Write a java program that would simulate traffic lights

Assignment Help JAVA Programming
Reference no: EM132131705

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: EM132131705

Questions Cloud

What size company would be more apt to use : Give a real-world example of when each of these technologies would be more advantageous for a customer.
Which are the logical steps proposed by margulis : Which are the logical steps proposed by Margulis that would help explain why the accumulation of oxygen in the atmosphere led to the evolution of mitochondria.
People of the united states : The United States established the first National Park in the world on March 1, 1872. What does this say about the people of the United States?
Pathway of complement activation : Which pathway of complement activation does the CH50 assay measure? Which pathway does the AH50 assay measure? Explain your answer
Write a java program that would simulate traffic lights : 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
Calculate the area of the view of view : You take a small section of leaf and view it underneath a microscope. You count 25 stomata. Now you want to calculate how many stomata would be in a leaf
Underneath a light microscope and physically : If you put the letter "e" on a slide underneath a light microscope and physically move it from left to right
Decomposing organic matter : This organism has a cell wall but no chloroplast. why would you classify this organism into "domain eukarya, kingdom of fungi"
Recessive to the dominant straight thumb : The allele for hitchhiker's thumb is recessive to the dominant straight thumb. In a population of 500 students

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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