java, JAVA Programming

Assignment Help:
1. Which of the following are not valid Java identifiers, and why?

(a) wolVes

(b) United(there is only one)

(c) 87

(d) 5 3

(e) Real ale

(f) isFound?by

2. A class Television has the following fields:

private TelevisionManufacturer supplier;

private String code

private int screenSize; // in inches

private String type; // e.g. plasma screen

Assume that the class TelevisionManufacturer is available and that this class contains an equals method.

(a) Define a class variable, totalTVs, whose purpose is to keep track of the total number of Television objects constructed during execution of a program that uses the Television class.

(b) Declare a default constructor for this class.

(c) Declare a constructor for this class which has a formal parameter corresponding to each field.

(d) Declare an accessor method called getScreenSize whose purpose is to return the value of the screenSize field of this Television.

(e) Declare a mutator method that sets the type of this Television to a given value.

(f) Declare a method to determine whether or not this Television has been supplied by a given manufacturer.

1. An electronics company needs to implement a simple stock control system. You are required to write a Java application which contains a class called StockItem together with a main method class called StockDemo. Information for each type of stock item consists of:

inventory identifier (e.g. A654Y);

quantity in stock (e.g. 350);

demand rate (quantity removed from stock each working day, assumed constant, e.g. 50);

re-order quantity (the size of an ordered batch of items, assumed constant, e.g 1000);

lead-time (number of working days delay between placing and receiving an order for a batch, e.g. 5).

The class StockItem should include fields for each of the above data items and should also include each of the following:

a default constructor that sets all fields to null or zero as appropriate;

a constructor with arguments for all fields;

set methods for all fields;

accessor methods for each of the fields;

a method to update the stock quantity when a batch is received;

a method called isReOrderPoint( ) that returns true if a batch needs to be re-ordered for this stock item and false otherwise;

a toString method that returns a description of this StockItem.

Add Java statements to your main method to thoroughly test your class. question #Minimum 100 words accepted#

Related Discussions:- java

Polymoethism, write a java program to test for class Person Student facult...

write a java program to test for class Person Student faculty Employee

Application with two user transactions-java, 1.) Write an application with ...

1.) Write an application with two user transactions (login which includes viewAllStudents and viewStudent ) with full MVC architecture that displays the details of the selected

Developing a prototype system in php and javascript, General Overview A...

General Overview A number of organisations are using micro-blogging as a cost-effective way of communicating with customers, building online communities and releasing informati

What are the principle concepts of oops, What are the principle concepts of...

What are the principle concepts of OOPS? Principle concepts upon that object oriented programming and design rest. They are: Abstraction: Abstraction refers to the act of

Solve neural network questions, Solve Neural Network Questions Project D...

Solve Neural Network Questions Project Description: You must know  Binary Chop and Kohonen Network, Backpropagation Algorithm. Implementation is required. Can using existi

Project on image processing, Project Description: Computer vision and Im...

Project Description: Computer vision and Image processing project to extract book title Skills required: Java, C Programming

How do i include static files within a jsp page, Static resources should al...

Static resources should always be contained using the JSP include directive. This way, the inclusion is performed just once during the translation phase. Do note that you should al

Toward privacy preserving and collusion resistance, Need Toward Privacy Pre...

Need Toward Privacy Preserving and Collusion Resistance in a Location Proof Updating System Project Description: Today's location-sensitive service relies on user's mobile de

Explain the remainder or modulus operator in java, Explain the Remainder or...

Explain the Remainder or Modulus Operator in Java? Java has one significant arithmetical operator you might not be familiar with, %, also called as the modulus or remainder ope

Write Your Message!

Captcha
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