What would you do to make code execute

Assignment Help JAVA Programming
Reference no: EM131221133

Code Review

Can some have this done immediately

public class BankAccount
{
private double balance;

public BankAccount()
{
balance = 0;
}
public BankAccount(double initialBalance)
{
balance = initialBalance;
}
public void deposit(double amount)
{
balance = balance + amount;
}
public void withdraw(double amount)
{
balance = balance - amount;
}
public double getBalance()
{
return balance;
}
}

Look at the code above, and identify the following:

• Constructor
• Field
• Method
• Primitive Type
• Instance Variable

The class above is not a complete Java program that could execute. What would you do to make it execute? Change the program, or add a source code file, to make it into a Java program that executes.

Suggest two other improvements you would make to this code.

Reference no: EM131221133

Questions Cloud

How do they use their literary standpoints to affect us : Compare the motives for killing for Grenouille and Frankenstein's monster? Both use high culture topics of quest, genre, and archetypes to help us understand this idea--how do they use their literary standpoints to affect us? What is the moral pur..
Challenges of testing throughout software development : Business Value and Challenges of Testing throughout Software development Life Cycle: A case from Sudan Software Market - relationship between testing and application performance.
What is the company total assets turnover : Du Pont Analysis - Gardial& Son has an ROA of 12%, a 3% profit margin, and a return on equity equal to 13%. What is the company's total assets turnover
What are the central theses of the texts at hand : What are the central theses of the texts at hand? What is the main idea of the passage? Note key terms or issues. What quote(s) from the reading capture(s) the main idea?
What would you do to make code execute : The class above is not a complete Java program that could execute. What would you do to make it execute? Change the program, or add a source code file, to make it into a Java program that executes.
Find out the cube roots of a perfect cube : How to find out the cube root of perfect cubes within seconds. To find out the cube roots of a perfect cube, Find out the cube root of 19683. Find out the cube root of 250047 Find the cube root of 175616.
Develop the state table for given circuit : What kind of finite state machine is this: Using a procedure by inspection can you state which sequences does this circuit detect? (current bit goes last) Develop the State Table for this circuit. Label all columns
Identify one strategy that could be challenging : Self-reflection is a vital part of using positive guidance strategies with young children. Analyze the strategies presented in Chapter 5 and consider which you would feel comfortable using with young children and which may be more difficult for yo..
Does crc detect more errors than a parity bit : Does CRC detect more errors than a parity bit? Why or Why not? A world wide web server typically receives small messages from clients but sends very large messages back to them. What type of ARQ protocol would be best suited?

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