Programming in Java Classes and Java Applets Modifying programs is required from time to time. This lesson will take an existing program and modify it to make updates to the code. Modify last week’s code to implement user input into the program and proces

computer science

Description

Programming in Java Classes and Java Applets Modifying programs is required from time to time. This lesson will take an existing program and modify it to make updates to the code. Modify last week’s code to implement user input into the program and process the information. Web pages implement Java Applets that are security signed. In this lesson, a basic Applet that shows shapes will be created and tested in the Applet Viewer. Assignment: Use last week’s assignment and modify it to enter the name and age from the Console (Console – see example 3.9 on page 129) or Dialog Box(Dialog box - For String variable see Example 3.19 on page 151. For Integer input see Example 3.20 on page 152-153). Create an Applet that uses two integer (int) variables x and y to place the picture of four circles (See Example 4.6 page 185) on the screen. Alternate the colors by setting the g.setColor method (see Example 4.9 on page 193). Also, use the g.drawString to place your name above the circles. Below is the what I already have please follow instruction above must be complete and a modified version of what is below. also must be in JAVA using netbeans IDE 8.1 /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package myfirstprogram; /** * * @author Gary */ public class MyFirstProgram { /** * @param args the command line arguments */ public static void main(String[] args) { // This is my first program // Enter your name where it says Your Name String name = "Gary"; // Enter your age where it says Your Age int age = 34; int ageNextBirthday, ageLastBirthday; // age minus 1 ageLastBirthday = age - 1; // age plus 1 ageNextBirthday = age + 1; // print out your results System.out.println("Hello, my name is "+name+"."); System.out.println("My age is "+age+"."); System.out.println("My age las birthday was "+ageLastBirthday+"."); System.out.println("My age next birthday is "+ageNextBirthday+"."); } }

Instruction Files

Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.