Program That Will Allow To Enter Information From Form To Keep Track Of Attorney Who Signed Up
Jan 13, 2015
I work for my local probate court, and one service we offer is email reminders. They fill out a form, it's entered in the system, and they will be notified when something is due. I've been allowed to create a program that will allow me to enter the information from the form to keep track of the attorney's who have signed up.
import java.sql.*;
import java.util.*;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;
public class Attempt1 {
public static void setConnection() throws SQLException {
Connection conn = null;
Statement state = null;
[Code] ....
The issue I have is the method setQuery. It displays a table with the data entered. Where it currently sits at line 21, it does not display the table, nor does it seem to terminate the program. The goal was to update the table with a few entries, and then display the Jtable. When placed above the setInsert method, it displays just fine, and will reflect the new entries added the next time you start it. I'm still learning Java outside of a classroom environment on my own, so I can only imagine that this is riddled with poor coding, but I just can't seem to figure out why it doesn't display the table after the setInsert method is called. In it's current state, this program is just meant to test functions of SQLite with Java. From there it will be created with a GUI.
View Replies
ADVERTISEMENT
Sep 17, 2014
I am new to Java an have to Create a program that keeps track of the following information input by the user: First Name, Last Name, Phone Number, and Age. Now - let's store this in a multidimensional array that will hold 10 of these contacts. So our multidimensional array will need to be 10 rows and 4 columns.You should be able to add and remove contacts in the array.
View Replies
View Related
Feb 28, 2014
You have a store that sells the following items:
Shoes $50.00
T-shirts $30.00
Shorts $75.00
Caps $15.00
Jackets $100.00
Your sales associates need a program where they can enter customer information and calculate the customer's total bill. When the sales associate enters the program they should be presented with this main menu.
Enter customer information
Display Total Bill
Quit
If the sales associate selects option 1, the program should allow the sales associate to input their name, address, and e-mail address. Your program should then display this customer information to the screen with a message that the customer has been added to the customer list.
If the sales associate selects option 2, the program should ask the sales associate for the customer's name, product that the customer is purchasing, the quantity, and the price of the product. The total bill will then be displayed to the screen and should include the following:
- The customer's name.
- The product the customer is purchasing, the quantity, and total cost
- The amount of tax 8%
- The total cost with tax.
Example Total Bill Output:
John Doe
Product Purchased Quantity Total Cost
Shoes 2 $100.00
Tax 8%: $8.00
Total Cost: $108.00
HOW DO I WIITE IT
View Replies
View Related
Jan 13, 2015
I need to make a program that keeps track of peoples names, allows you to add a note to each name and preferably would reorganize whatever you put in by date or by spelling. (I suppose the phonebook application in cell phones is a good match, a supermarket's list of foods and prices would work as well).
View Replies
View Related
Mar 16, 2014
i want create little program which enter the number, ant program says triangle exist or not. So code :
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
[code]...
So when i put first num like 1, next num like 2 and next num like 100 , program says Triangle exist.
View Replies
View Related
Nov 11, 2014
i have a program that is to store DVD information and when i enter all the information asked it returns no info. I have a DVD inventory file and a DVD extended file.
DVDinventoryprogram class
package inventory2;
import java.util.Scanner;
[Code]....
View Replies
View Related
May 26, 2014
I bought a certificate to sign my jars, if a deploy my applet in a html file with out framework, just html and js, the works great, I can call from javascript all public methods from the applet. The real problem is when I try to deploy the same signed jar on a adf project in Jdeveloper. Does not work at all and java execute some warnings and later applet is block, the message say something like "exist some jars signed and not signed" But I am sure that all jars are signed...
I got this:
applet console:
image
All jars are signed, dependencies too.
View Replies
View Related
Oct 3, 2014
I am working on a program that asks me to track the position of an imaginary ball as it bounces around an imaginary box. The user gives me input for the starting position of the ball (x,y), the bottom-left boundaries of the box (xl, yl), the top right boundaries (xr, yr) and the angle. The program then needs to find where the ball will hit the box, and then print that location and find the new angle for the next point. My program currently works in most cases if the angle is less than pi.
Here is my code
public class BouncyBall {
public static void main(String args[]){
if (args.length != 8) {
System.out.println("Error: usage is X, Y, Angle, Xl, Yl, Xr, Yr,N");
System.exit(1);
}
double x,y,xl,yl,xr,yr,angle;
int n;
x=Double.parseDouble(args[0]);
y=Double.parseDouble(args[1]);
[Code] .....
View Replies
View Related
Feb 28, 2015
I am trying to create a GUI with already existing code. My assignment is: Modify the Inventory Program to use a GUI. The GUI should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the GUI should display the value of the entire inventory, the additional attribute, and the restocking fee.
Where to start. The text book does not cover a GUI that displays this type of information rather it just displays graphics. I would like to create a separate class that holds the GUI information just to make everything flow better. I have provided my current code below:
Java Code:
// ProductTest.java
// by JakeB
public class ProductTest {
// main method begins
public static void main(String[] args) // begin main {
myGUI display = new myGUI();
display.setVisible(true);
[Code] .....
This is all I have for the GUI. I am at a total loss and I am behind 2 weeks now. I cannot move forward until I am able to get this done and the class ends next week.
View Replies
View Related
Oct 13, 2014
so I had to create a program that allows the user to enter a day using a number and then enter a year and after they did that it would create an entire calendar for that year ..so I have that but the only issue is I can not get the numbers to line up neatly.how to do the entire thing in loops, I tried a couple in here..what this would look like as loops instead of switches and cases and if else
import java.util.Scanner;
public class Calendar {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
[code]....
View Replies
View Related
Feb 11, 2014
We have a large applet based application with a current client-side minimum jar download size of ~4MB. If we put ALL of our class files into jars, that size will probably double. Most users only use a small portion of the class files for their particular tasks. Having ALL users download ALL the classes, compressed in jars, is extremely time consuming and a major problem after application updates due to the large number of users and the network load it would cause.
So after downloading some basic jars other needed individual class files are downloaded as and when requested by user. For signing applet, applet class files are moved to jar and this jar is signed with following attributes in manifest.
Jar file manifest:
Permissions: all-permissions
Codebase: *
Application-Name: XYZ
Application-Library-Allowable-Codebase: *
Trusted-Library: true
When applet is invoked from browser with JRE 1.7.51, there is a security blocked exception for individual files which are accessed from the signed applet jar. Why individual class files are blocked? Is it necessary to move all individual class files in a jar?
View Replies
View Related
Apr 14, 2014
I have to write a gui program where I can enter a file name and then it gets displayed in a text area when I click Open. Conceptually, I do not get this. I was thinking of appending the text file into a string or something, but I guess I'm confused on how it all works and how I can open the text file. Not asking for the code, but just a compass or something.
View Replies
View Related
Sep 10, 2014
I wrote a java program for my gui number converter app, the main purpose of this program is to make sure that user enters only a binary number for conversion from binary to other number formats. the problem is my program keeps prompting me to enter correct binary number, no matter if i enter correct binary number, it will still keep prompting me to enter correct number. Here is the code
import java.util.*;
public class test {
Scanner key = new Scanner(System.in);
String in;
int b;
public test()
[Code] .....
View Replies
View Related
Apr 14, 2014
I simply need to write a program that asks a user to input a password. It has to be in this format: DDD-LL-DDDD. The D's mean Digit and the L's stands for Letter. The User has to enter the Hyphens.
If the password isn't entered in that exact format the program should read out a error. If the hyphens aren't entered the program should read out a error. If there are too many characters entered, there should be a error.
import java.util.Scanner;
public class security {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Enter Security Code: ");
System.out.println("Use the format: DDD-LL-DDDD and include dashes");
String code = input.next();
char c;
[Code] ....
I'm trying to figure how how to get the code to check if the values entered are in the correct place. I'm also not sure how to make the program check for hyphens. I feel like I'm close though. I can easily add the correct error and valid messages later if I could just figure out this part.
View Replies
View Related
Sep 2, 2014
I'm using Jgrasp and my prompt is asking me to write a program where the program prompts the user to enter 4 grades between 0 and 100. And you have to display the grades, and the program has to calculate the minimum grade, the maximum grade and the average.I'm just having problems with the max?
// Import Java Scanner.
import java.util.Scanner;
// Name Class.
public class Practice_4_1
[code]...
View Replies
View Related
Apr 30, 2015
package question.pkg3;
import java.util.Scanner;
public class Question3 {
public static void main(String[] args) {
// TODO code application logic here
Scanner Luka=new Scanner(System.in);
double sum=0;double count=0;
int[] a=new int[10];
[code]....
I'm required to write a program that allows the user to enter up to 10 integer grades into an array. Stop the loop by typing in ‐1. Your main method should call an Average method that returns the average of the grades.I There's something wrong with my program , the count always stays 0 and the sum is always 1 less than the actual sum.Sample input and output :
Enter grade 1: 8
Enter grade 2: 9
Enter grade 3: 10
Enter grade 4: 5
Enter grade 5: 8
Enter grade 6: 9
Enter grade 7: -1
output
Average grade is 8.1666666667On line 13 I had count=count+1 ;
View Replies
View Related
Feb 21, 2015
I have to meet certain requirements for this one program, and one of them is as follow: The program will require the user to enter the needed values one after another. If any of the entered values is invalid, then the program will detect that and go into a loop requiring the user to enter a valid value. The program must keep track of the total number of invalid values that the user has entered.
I know how to set a restriction and create a loop to keep asking the same question until it is satisfactory ( in this case I used a while loop) but I am at loss on how I should keep track of the total number of invalid values. I know I can use an increment but how do I set a variable for when the program meets an wrong input from the user.
View Replies
View Related
Sep 13, 2014
I'm working a an assignment for my IT/215 class and I'm having a little trouble with my arrays. My code compiles just fine but when it comes to displaying the information I've input into my array it doesn't seem to want to and I'm not sure what I'm doing wrong here. On line 136 originally I had [DVDs [count] = count+1]] but it wouldn't compile. I then put line 136 to [ DVDs[count] = new Inventory();] and I think that's were my issue is but I'm not sure....
// Purpose:the purpose of this software is to display inputs as wells as the stocks and price of inputs.
class Inventory
{
private double ItemNumber; //to store Item number
private String ItemName; //to store Item name
private double UnitsInStock; //to store number of units in stock
private double UnitPrice; //to store Unit price
private double InventoryValue; //to store Inventory value
private double TotalInventory; //to store Total Inventory value
[Code] .....
View Replies
View Related
Apr 29, 2014
I'm making a program that displays information for "employee" objects of different types. This works with a hierarchy that goes Person→ Employee→ Fulltime/Adjunct, and a driver that tests the inheritance. The Person class is given and only supplies the name, the employee class manages the year hired and the ID, and the types of employee classes manage the salaries.
One object (called staff[2]) is supposed to first be printed with default information and then later updated via set methods. I figured out how to update the name, but I don't know how to update the rest of the information because the employee's name is managed in the Person class and the reset of the information is managed in the less-general classes, and the objects are all in an array of Person.
How do I call the set methods necessary to update more of staff[2]?Output (scroll to see the updating section)
The current year is 2012
Name: Flintstone, Fred
ID Num: BR-1
Year Hired: 2005
Years Of Service: 7
Salary: 65000.12
Fulltime Type Employee
[code]....
View Replies
View Related
Jun 2, 2014
I want to implement a 'Keep me signed in' option in the login page of an application. I have noticed this option is present in the form of a checkbox on the login page of many websites but i don't know how it can be coded . When selected, a user is no longer asked for his username and password on subsequent sessions but he is automatically given access.
View Replies
View Related
Oct 21, 2014
so I had to make a program that prompts the user to enter a loan amount and the years for the loan and I have the conversions and everything my only issue is that when the chart pops up it just looks like a bunch of numbers and its missing the column headers
for example
Interest Rate Monthly Payment Total Payment
import java.util.Scanner;
public class InterestRate {
public static void main(String[] args) {
double monthlypayment = 0;
double totalpayment = 0;
Scanner input = new Scanner(System.in);
System.out.println("Enter Loan Amount");
[Code]...
View Replies
View Related
Oct 20, 2014
I am writing a short quiz program, and when the user inputs their answer they hit the enter key (the are int). But the last question on my quiz is asking the user to they want to repeat the quiz, but when I run the program, it won't allow me to input any information. I can briefly remember my lecturer saying something about entering in a code after each int the user inputs but I can't remember what it was.
Here is a snippet of my code:
//Question 3
do{
System.out.println("Question 3- What Hollywood actor did Mila Kunis have a baby with recently?");
System.out.println( question3 + ".Ashton Kutcher 2.Bradly Cooper 3.Leonardo Dicaperio h.Get a hint");
answer3 = stdIn.nextInt();
if(answer3 != question3)
[Code] ....
View Replies
View Related
Feb 6, 2014
I am trying to write a program that asks the user to enter a number from 1 through 10 and then the program will display the roman numeral for that number.
I am also adding a error message in which i haven't yet because im still trying to figure out how to the program will do the roman numeral.'
I have used the if and else if. but when i input a number it just repeats the number back to me.
The program cimpiles but it doesn't do what i want. here is what i have so far. how can i get the program to display the roman numeral after the number is entered.
import javax.swing.JOptionPane;
public class Romannumeral
{
public static void main(String[] args)
{
double number;
[Code] .....
View Replies
View Related
Nov 25, 2014
I did a problem from my book which is "Write a method that displays an n-by-n matrix. Each element is 0 or 1, which is generate randomly. Write a test program that prompts the user to enter n and displays the n-by-b matrix".
So if a user would enter 3, and output could be 0 1 1
0 1 0
1 0 1
So here's my question... I was able to get the program to work in the way my book describes (by just writing the code in the class with the main), but for practice, I want to learn how to do this OOP-style...
I'm not sure how to do this, though, since the method is a void method, so I can't seem to call it within a toString method.
import java.util.Scanner;
public class MatrixTest {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("Enter an int");
int number = input.nextInt();
MatrixClass mc = new MatrixClass(number);
[Code] .....
View Replies
View Related
Sep 13, 2014
How to improve my code. I finally was able to create a program that gives you the corresponding letter grade, when you enter in a numeric grade without using an array. The only issue left is that I have to be able to enter 5 grades at a time, and it give me the letter grade for all 5. I have the programming working, but only am able to enter 1 at a time. I am not sure what kind of loop or if I am supposed to use a loop.
public static void main(String[] args){
{
int grade = 0;
Scanner input = new Scanner(System.in);
System.out.println("Enter : ");
grade = input.nextInt();
if (grade >= 90)
[Code] .....
View Replies
View Related
Mar 19, 2011
import java.io.*;
public class Netaji
{
[Code]....
View Replies
View Related