一键电影院Java代码 影院管理系统java

java课程设计源代码(急?。。。。?/h2>import java.awt.Color;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.SwingConstants;
import javax.swing.border.LineBorder;
public class game21 extends JFrame {
private JLabel label_2;
private int number;
private int sum;
final JLabel label = new JLabel();
final JLabel label_1 = new JLabel();
public static void main(String[] args) {
new game21();
}
public game21() {
super("21点一键电影院Java代码?!");
getContentPane().setLayout(null);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
final JButton button = new JButton();
button.addActionListener(new ActionListener() {
public void actionPerformed(final ActionEvent arg0) {
onClick();
}
});
button.setText("出牌");
button.setBounds(170, 350, 106, 28);
getContentPane().add(button);
label.setBorder(new LineBorder(Color.black, 1, false));
label.setHorizontalAlignment(SwingConstants.CENTER);
label.setFont(new Font("", Font.BOLD, 26));
label.setText("背面");
label.setBounds(158, 81, 137, 153);
getContentPane().add(label);
label_1.setText("一键电影院Java代码你已经拥有的牌:");
label_1.setBounds(109, 22, 270, 45);
getContentPane().add(label_1);
this.setBounds(200, 300, 501, 528);
this.setVisible(true);
getContentPane().add(getLabel_2());
}
public int randNumber() {
try {
Thread.sleep(10);
} catch (InterruptedException e) {
e.printStackTrace();
}
return (int) (Math.random() * 101);
}
public void onClick() {
number = this.randNumber();
this.sum= number;
label.setText(""number);
String strTemp = this.label_1.getText();
strTemp= ""number" ";
label_1.setText(strTemp);
String temp = "合计一键电影院Java代码:"sum;
label_2.setText(temp);
isWin();
}
public void isWin() {
if (sum21) {
JOptionPane.showMessageDialog(this, "一键电影院Java代码你输一键电影院Java代码了");
clear();
return;
} else if (sum == 21) {
JOptionPane.showMessageDialog(this, "你赢了");
clear();
return;
} else {
int i = JOptionPane.showOptionDialog(this, "是否继续?", "提示",
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE, null, null, null);
if (i == JOptionPane.OK_OPTION) {
onClick();
} else
return;
}
}
private void clear() {
label_2.setText("合计:");
sum = 0;
number = 0;
label_1.setText("你已经拥有的牌:");
}
/**
* @return
*/
protected JLabel getLabel_2() {
if (label_2 == null) {
label_2 = new JLabel();
label_2.setText("合计:");
label_2.setBounds(313, 35, 66, 18);
}
return label_2;
}
}
真好无聊中 。。
求JAVA源代码import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class GradeStatistic {
public static void main(String[] args) {
GradeStatistic gs = new GradeStatistic();
ListMark list = new ArrayListMark();
float sum = 0;
while(true){
Scanner sc = new Scanner(System.in);
System.out.print("Please input student name: ");
String name = sc.nextLine();
if(name.equals("end")){
break;
}
System.out.print("Please input student score: ");
float score = sc.nextFloat();
sum= score;
list.add(gs.new Mark(name, score));
}
float max = list.get(0).getScore();
float min = list.get(0).getScore();
for(Mark mark: list){
if(maxmark.getScore()){
max = mark.getScore();
}
if(minmark.getScore()){
min = mark.getScore();
}
}
float average = sum / list.size();
System.out.println("Average is: "average);
System.out.println("Max is: "max);
System.out.println("Min is: "min);
}
private class Mark{
private String name;
private float score;
public Mark(String name, float score){
this.name = name;
this.score = score;
}
public String getName() {
return name;
}
public float getScore() {
return score;
}
}
}
----------------------
Please input student name: Zhang san
Please input student score: 100
Please input student name: Li Si
Please input student score: 91
Please input student name: Ec
Please input student score: 35
Please input student name: ma qi
Please input student score: 67
Please input student name: end
Average is: 73.25
Max is: 100.0
Min is: 35.0
现在企业java开发一般使用哪些软件开发?针对现在企业的话,其实使用的软件是差不多的,企业越大,可能涉及到的工具更多些 。学习Java开发推荐千锋教育,千锋教育口碑很不错 , 实力强大,而且千锋的企业使命就是致力于帮助更多迷茫的学生实现他们的梦想 。
列举如下:
1、【idea】这个是目前最主流的Java开发工具,应该也是使用最多的了;和它经常拿出一块讨论的是【Eclipse】,这两个是Java使用最广泛的开发工具;
2、【github/gitlab】这两个网站主要是用于代码管理的,目前使用git的比使用svn的要多很多;
3、【maven】这个其实应该不能算工具,是用于jar包管理的;
4、【jira/禅道/bugzilla】这几个是用于项目管理,测试提bug用的;
5、【jenkins】用于做持续集成和项目编译的;
6、【conflunece/语雀】这两个一般是用于团队协作和文档记录的;比如需求文档,开发文档,测试文档等;
7、【starUML/processON/planUML】这些一般用于画流程图,时序图使用的;
8、【Axure】这个是用于产品使用,画原型prd的;
想要了解更多java开发的相关信息,推荐咨询千锋教育 。千锋励精图治,不改教育初心 。十一年来,千锋以政策为引导,不断完善国内特色现代职业教育体系建设,充分发挥教研师资队伍使命,构建品质教育 , 加大创新型人才培养力度 , 为经济发展提供智力人才和智力支撑,成为新时期职业教育发展的新方向,在同行业中有很高的美誉度 。
求java做动画代码import java.awt.Canvas;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.RenderingHints;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
public class TestImage extends Frame
{
private static final long serialVersionUID = 1L;
private static boolean PRESSED = false;
private static int pointX = 0;
private static int pointy = 200;
private static int RIGHT_GO = 0;
private static int LEFT_GO = 0;
private static int DIR = 0;
private static int ANGLE = 0;
private static int W = 50;
private static int H = 60;
private _Canvas canvas = null;
public TestImage ()
{
add (canvas = new _Canvas ());
setIgnoreRepaint (true);
requestFocus ();
}
public class _Canvas extends Canvas implements Runnable
{
private static final long serialVersionUID = 1L;
private BufferedImage bi = null;
private Image bufferedImage = null;
private Thread thread = null;
private long sleepTime = 10;
public _Canvas ()
{
try
{
bi = ImageIO.read (new File ("go.png"));
}
catch (IOException e)
{}
setBackground (Color.BLACK);
requestFocus ();
addKeyListener (new KeyListener ()
{
@Override
public void keyTyped ( KeyEvent e )
{}
@Override
public void keyReleased ( KeyEvent e )
{
RIGHT_GO = 0;
PRESSED = false;
}
@Override
public void keyPressed ( KeyEvent e )
{
// 38 40 37 39上下左右
DIR = e.getKeyCode ();
PRESSED = true;
}
});
}
@Override
public void paint ( Graphics g )
{
Graphics2D g2d = (Graphics2D) g;
g2d.setRenderingHint (RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
g2d.drawImage (rotateImage (bi.getSubimage (RIGHT_GO, LEFT_GO, W, H), ANGLE, true), pointX, pointy, W, H,
this);
g2d.dispose ();
}
@Override
public void update ( Graphics g )
{
if (null == bufferedImage)
{
bufferedImage = createImage (getWidth (), getHeight ());
}
Graphics bufferedG = bufferedImage.getGraphics ();
bufferedG.clearRect (0, 0, getWidth (), getHeight ());
paint (bufferedG);
bufferedG.dispose ();
g.drawImage (bufferedImage, 0, 0, this);
g.dispose ();
}
public void start ()
{
thread = new Thread (this);
thread.setName ("TestImage");
thread.setPriority (Thread.MIN_PRIORITY);
thread.start ();
}
public synchronized void stop ()
{
thread = null;
notify ();
}
@Override
public void run ()
{
Thread me = Thread.currentThread ();
while (thread == me!isShowing () || getSize ().width == 0)
{
try
{
Thread.sleep (555);
}
catch (InterruptedException e)
{
return;
}
}
while (thread == meisShowing ())
{
if (PRESSED)
{
try
{
if (DIR == 39)
{
RIGHT_GO = RIGHT_GO50;
LEFT_GO = 0;
pointX = pointX1;
if (pointX420)
{
ANGLE = 90;
pointX--;
pointy--;
W = 60;
H = 50;
}
if (RIGHT_GO50)
{
RIGHT_GO = 0;
}
}
else if (DIR == 37)
{
pointX = pointX - 1;
RIGHT_GO = RIGHT_GO50;
LEFT_GO = 60;
if (pointX0)
{
ANGLE = -90;
【一键电影院Java代码 影院管理系统java】pointX;
pointy--;
W = 60;
H = 50;
}
if (RIGHT_GO50)
{
RIGHT_GO = 0;
}
}
else if (DIR == 38)
{
W = 50;
H = 60;
pointy = 150;
ANGLE = 0;
RIGHT_GO = 100;
}
else if (DIR == 40)
{
W = 50;
H = 60;
ANGLE = 0;
pointy = 200;
RIGHT_GO = 0;
}
Thread.sleep (sleepTime);
repaint ();
}
catch (InterruptedException e)
{
break;
}
}
else
{
RIGHT_GO = RIGHT_GO50;
LEFT_GO = 0;
pointX = pointX1;
if (RIGHT_GO50)
{
RIGHT_GO = 0;
}
if (pointX500)
{
pointX = 0;
}
try
{
Thread.sleep (sleepTime);
repaint ();
}
catch (InterruptedException e)
{
break;
}
}
}
thread = null;
}
}
/**
* 旋转图像为指定角度
*
* @param degree
* @return
*/
public static BufferedImage rotateImage ( final BufferedImage image, final int angdeg, final boolean d )
{
int w = image.getWidth ();
int h = image.getHeight ();
int type = image.getColorModel ().getTransparency ();
BufferedImage img;
Graphics2D graphics2d;
( graphics2d = ( img = new BufferedImage (w, h, type) ).createGraphics () ).setRenderingHint (
RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
graphics2d.rotate (d ? -Math.toRadians (angdeg) : Math.toRadians (angdeg), w / 2, h / 2);
graphics2d.drawImage (image, 0, 0, null);
graphics2d.dispose ();
return img;
}
public static void main ( String[] args )
{
EventQueue.invokeLater (new Runnable ()
{
@Override
public void run ()
{
final TestImage ti = new TestImage ();
ti.setSize (new Dimension (500, 300));
ti.setLocationRelativeTo (null);
ti.addWindowListener (new WindowAdapter ()
{
@Override
public void windowClosing ( WindowEvent e )
{
System.exit (0);
}
@Override
public void windowDeiconified ( WindowEvent e )
{
ti.canvas.start ();
}
@Override
public void windowIconified ( WindowEvent e )
{
ti.canvas.stop ();
}
});
ti.setResizable (false);
ti.canvas.start ();
ti.setVisible (true);
}
});
}
}
哪里有JAVA开发板 , 软件开发平台,Web开发平台或快速开发平台的源码,包括工作流源码 , 还有JAVA OA源码?公司OA业务扩展需要,需要有相应的开发平台和OA系统支撑,希望符合一下条件:JAVA、J2EE,JAVA快速开发平台源码,JAVA软件开发平台源码,或者JAVA开发板源码,包括JAVA工作流源码 , 最好是JBPM的,另外就是有相应的系统源码,如JAVA OA系统源码 。
首先您需要一个带由标准OA 的开发平台,平台的语言是JAVA,J2EE,那么很好,我这边推荐下天翎的地代码开发平台,本身是java语言,自带宏语言,就是J2ee , 所以 , 在这个维度是吻合,另外现在如果他们周年庆合作,会有一个优惠 , 赠送知识文档管理系统和OA 系统 。基本上该有的公文处理,待办事情等都具备 。
看是否这样的回复是吻合贵司需求的?
存在即合理
一个简单的Java程序代码?package com.zpp;public class Charge {
public static void main(String [] args) {
if(args.length ==0) {
System.out.println("parameter error!");
System.out.println("java com.zpp.Charge [int]");
return;
}
int min = Integer.parseInt(args[0]);
double money = 0.0;
if (min = 0) {
money =0.0;
System.out.println("not money");
} else if (min = 60) {
money = 2.0;
} else {
money = 2.0(min - 60) * 0.01;
}
System.out.println("please pay: "money);
}
} 编译:javac -d . Charge.java运行:java com.zpp.Charge 111
关于一键电影院Java代码和影院管理系统java的介绍到此就结束了 , 不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站 。

    推荐阅读