Entries by Munene david

Write a Java program which defines unconstrained array of user defined length n

Write a Java program which defines unconstrained array of user defined length n (the value of n is to be taken from a proper user’s input). Fill in the array with n random numbers. The application should (1) display all elements of the array, (2) display the sum of all elements, and (3) calculate the […]

 

Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

Create a class named CollegeCourse that includes 4 fields – the department name (e.g. “ENG”),

Create a class named CollegeCourse that includes 4 fields – the department name (e.g. “ENG”), the course number (e.g. 101), the number of credits (e.g. 3) and the course fee (e.g. “360”). Add getters and setters methods for each field. Add overloaded constructor, which accepts three parameters for the proper fields above, except for the fee field […]

 

Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

Create a class named Vehicle that acts as a superclass for vehicle types

Create a class named Vehicle that acts as a superclass for vehicle types. The Vehicle class contains private variables for the number of wheels and the average number of miles per gallon (MPG).  For each of these variables – create the proper get and set methods. The Vehicle class also contains a constructor with integer parameters […]

 

Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"

The following code creates a simple ArrayList

The following code creates a simple ArrayList: import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; public class Ex01 { public static void main(String[] args) throws IOException { BufferedReader userInput = new BufferedReader (new InputStreamReader(System.in)); ArrayList<String> myArr = new ArrayList<String>(); myArr.add(“Zero”); myArr.add(“One”); myArr.add(“Two”); myArr.add(“Three”); } } Starting with this provided code, add the following functionality:   […]

 

Looking for a Similar Assignment? Order now and Get 10% Discount! Use Coupon Code "Newclient"