SlideShare a Scribd company logo
1 of 24
Download to read offline
This is the assignment:
OBJECTIVES
After finishing this lab, students can have the following:
Understand how to declare an unsorted-optimized array data structure
Know how to insert nodes to the structure, fetch a node with a key field of node, update the
information of a node and delete a node from the structure
Verify that the nodes in the unsorted-optimized array data structure are fully encapsulated.
Students will be familiar with the ArrayList and apply all the basic operation to access nodes
Also, students recognize that ArrayList is a heterogeneous data structure that can store nodes of
any type of objects.
REQUIREMENT STATEMENT
A car dealer needs an application that can help the shop to do the following tasks:
1.Insert a car or a motocycle
2.Test for the encapsulation of the data structure
3.Remove a car or a motocycle
4.Update information of a car or a motocycle
5.Show All vehicles
6.Exit
Also, the owner of the shop asks for:
-Using the Unsorted Optimized Array data structure for the application and apply Inheritance
and polymorphism of Object Oriented Programming
-Requiement for output:
The car’s information is displayed as below (for example)
VIN: 123A456B Color: White Year: 2014
Car make: Toyota Model: Sienna Number of passengers: 8 Number of doors: 4
The motocycle’s information is displayed as below (for example
VIN: 321BC654
Color: Grey
Year: 2015
Motocycle make: Honda
Model: PCX150
Has side car: no
-After a task from the menu, the application should allow users to continue using the application
and only terminate when users select Exit
COSC2436 – Lab3
1
TASK INSERT
-Display the message: “*** TASK: INSERT and FETCH A CAR OR A MOTOCYCLE ***”
-Allow users to enter the information of a car or a motocyle from the keyboard -Insert the
car/motocycle to the data structure
-Fetch the information of car/motocycle by its VIN from the data structure that have entered to
the structure to ensure that the car/motocycle is in the structure
TEST FOR ENCAPSULATION
-Display the message: “*** TASK: TEST FOR DATA ENCAPSULATION ***”
-Create a test car with the following information typed from the keyboard: -Insert this test car to
the data structure
-Modify the the color of the test car with different color
-Declare an object of car named “copy” and assign the node that is fetched from the data
structure with the target key as VIN of test car
-Display information of the object named copy
-Compare the color of test car with the color of object copy. If they are different then display the
message: “The Unsorted Optimized Array structure has the encapsulation”; otherwise display
“The Unsorted Optimized Array structure does not have the encapsulation”
TASK UPDATE
-Display: “***TASK: UPDATE INFORMATION OF A CAR OR A MOTOCYCLE *** “ -
Create an object of class Car named newNode
-Fetch a node with the VIN is the same VIN of test car then assign to newNode, therefore, the
newNode has the same VIN with the test car
-Change the color of the newNode to different color -Update the data structure with with the
newNode
-Fetch with the key as the key of test car. If the node resulted from fetch has different color from
the test car the display the message “Update test car successfully”; otherwise display “Update
test car failed”
TASK DELETE
-Display: “ *** TASK: DELETE A CAR OR A MOTOCYCLE ***”
-Delete the node with the VIN as SP2017 that was not inserted to the data structure, print out the
result of task delete (output: false)
-Delete the node with the VIN of the above test car, print the result (output: true) -Fetch with the
key as the VIN of the test car, print out the result (output: null)
TASK SHOW ALL
-Call showAll to display all nodes on the data structure
WHAT WE NEED TO KNOW TO DO THE PROGRAM
-Review how to declare the Inheritance relationship between 2 classes
-How to write the constructor, toString or other methods of child classes to inherit from the super
class -How to apply polymorphism to the main
-Understand what is Unsorted Optimized Array structure, how initialize the Unsorted Optimized
Array data structure
-How 4 operations of Unsorted Optimized Array structure work
UML and PSUEDO-CODE
You should provide the UML of super class, and 2 child classes
The pseudo-code is provided in the requirement, you do not need to rewrite; just follow step by
step to write the code
COSC2436 – Lab3
2
HOW TO DO THE LAB part1
-After provide UML and read the pseudo-code, start the Java editor -Create the project name
SP2017LAB3_PART1_yourLastname
-Add super class named SP2017LAB3_Vehicle_yourLastname that maintain Vin number, color,
make, model, year. It also has some methods, such as, mutator, accessor, and toString, method
forward (accept the amount of distance in miles, for example, 25, then display “move forward 25
miles”), method backward (accept the amount of distance in miles, for example 3 then display
the message “move backward 3 miles”), turn left (display word “Turn left”) and turn right
(display word “Turn Rright”)
-Add child class named SP2017LAB3_Car_yourLastName inherits from above class Vehicle. It
has more data members, such as, number of passengers, number of doors
-Add child class named SP2017LAB3_Motocycle_yourLastName inherits from above class
Vehicle. It has more data members, such as, has side car (boolean)
-Add a data structure class named
SP2017LAB3_VehicleUnsortedOptimizedArray_yourLastName that maintain size(int), a vehicle
array and next (int) to hold the location where the new node is inserted to the structure. Also, the
class has the methods for 4 operations: insert, fetch, delete, update and showAll that display all
the nodes in the structure. ( see the code on page 103 for your reference)
-Add a driver class name SP2017LAB3_VehicleDealerShop_yourLastname that do the
requirement asking for
PART2:
OBJECTIVES: Practice using Java ArrayList class.
REQUIREMENT and HOW TO DO THE LAB PART2
Add the following part to the previous project with the following step by strep (pseudo-code)
-Declare a data structure of ArrayList with the size 25
-Insert 3 cars/motocycles with information that are entered from the keyboard -Show all 3 nodes
that have inserted to the ArrayList data structure
-Use a for loop to insert number 1 to 100 to the above data structure of ArrayList
-Display the size of the above ArrayList.
-Remove the one above car/motocycle from the ArrayList data structure with one of the VIN
displyed at above showAll(). Then display the size of the ArrayList structure
-Get and display the information of nodes at the location 45. Change the value at location 45 to
2016. Display the information at location 45 again
-Use JOptionPane to display the message: “Congratulation! You are successful on ArrayList
with four operations: add, get, remove and set”
This is the code I have so far:
***Vehicle Class***
import java.util.Scanner;
public class SP2017LAB3_Vehicle{
//
private static Scanner keyboard = new Scanner(System.in);
protected String vin, model, sideCar;
protected String color;
protected String make;
protected int year, miles, passengers, doors;
// default constructor
public SP2017LAB3_Vehicle() {
vin = null;
model = null;
color = null;
make = null;
year = 0;
miles = 0;
}
//parameter constructor
public SP2017LAB3_Vehicle(String vin, String model, String color, String make,
int year, int miles){
this.vin = vin;
this.model = model;
this.color = color;
this.make = make;
this.year = year;
this.miles = miles;
}
// mutator method
public void setVin(String vin){
this.vin = vin;
}
// accessor method
public String getVin(){
return vin;
}
public void setColor(String color){
this.color = color;
}
public String getColor(){
return color;
}
public void setMake(String make){
this.make = make;
}
public String getMake(){
return make;
}
public void setYear(int year){
this.year = year;
}
public int getYear(){
return year;
}
public void setMiles(int miles){
this.miles = miles;
}
public int getMiles(){
return miles;
}
public void forward(){
System.out.println("How far forward would you like to go?");
miles = keyboard.nextInt();
System.out.println("Move forward " + miles + " mile(s)");
}
public void backward(){
System.out.println("How far backward would you like to go?");
miles = keyboard.nextInt();
System.out.println("Move backward " + miles + " mile(s)");
}
public void left(){
System.out.println("Turn left");
}
public void right(){
System.out.println("Turn right");
}
// Standard output list
public String toString() {
String infoOutput = "VIN:t" + vin + " Color:t" + color + " Year:t";
return infoOutput;
}
public SP2017LAB3_Vehicle deepCopy(){
SP2017LAB3_Vehicle clone = new SP2017LAB3_Vehicle(vin, model, color, make, year,
miles);
return clone;
}
public int compareTo(String targetKey){
return(vin.compareTo(targetKey));
}
}
***Car***
import java.util.Scanner;
public class SP2017LAB3_Car extends SP2017LAB3_Vehicle{
private static Scanner keyboard = new Scanner(System.in);
int doors;
int passengers;
public SP2017LAB3_Car() {
super();
doors = 0;
passengers = 0;
}
//
public SP2017LAB3_Car(String vin, String model, String color, String make,
int year, int miles, int door, int passenger){
super(vin, model, color, make, year, miles);
doors = door;
passengers = passenger;
}
public int getDoors(){
return doors;
}
public void setDoors(int door){
doors = door;
}
public int getPassengers(){
return passengers;
}
public void setPassengers(int passenger){
passengers = passenger;
}
public void printCar(){
super.toString();
System.out.println("Car make: t" + make + " Model: t" + model + " Number of
passengers: " + passengers +
" Number of doors: " + doors);
}
public void carInfo(){
System.out.println("How many passengers can legally ride in the car?");
passengers = keyboard.nextInt();
System.out.println("How many doors does the car have?");
doors = keyboard.nextInt();
}
}
***Motorcycle***
import java.util.Scanner;
publicclass SP2017LAB3_Motorcycle extends SP2017LAB3_Vehicle {
privatestatic Scanner keyboard = new Scanner(System.in);
boolean sideCars;
String hasSideCar;
public SP2017LAB3_Motorcycle (){
super();
sideCars = false;
}
public SP2017LAB3_Motorcycle (String vin, String model, String color, String make,
int year, int miles) {
super(vin, model, color, make, year, miles);
sideCars = false;
}
publicvoid setSideCars(boolean sideCar){
sideCars = sideCar;
}
publicboolean getSideCars(){
return sideCars;
}
publicvoid printMotorcycle(){
super.toString();
if (sideCars == true){
hasSideCar = "Yes";
}
else{
hasSideCar = "No";
}
System.out.println("Motorcycle make: t" + make + " Model: t" + model + " Has
side car: " + hasSideCar);
}
}
***VehicleDealerShop***
import java.util.Scanner;
//
public class SP2017LAB3_VehicleDealerShop {
static SP2017LAB3_Vehicle newNode = null;
static String option = null, choice = null;
//
private static Scanner keyboard = new Scanner(System.in);
//
public static void main(String[]args){
//
SP2017LAB3_Vehicle inform = new SP2017LAB3_Vehicle();
//
SP2017LAB3_VehicleUnsortedOptimizedArray array = new
SP2017LAB3_VehicleUnsortedOptimizedArray();
while(true){
//
System.out.println("1: Insert a car or motorcycle");
System.out.println("2. Test for the encapsulation of the data structure");
System.out.println("3. Remove a car or motorcycle");
System.out.println("4. Update information of a car or motorcycle");
System.out.println("5. Show all vehicles");
System.out.println("6. Exit");
//
int selection = Integer.parseInt(keyboard.nextLine());
//
switch(selection){
case 1:
//
System.out.println("*** TASK: INSERT and FETCH A CAR OR A MOTORCYCLE
***");
System.out.println("Do you wish to insert a car or motorcycle? Y/N");
option = keyboard.nextVehicleDealerShopLine();
if (option == "Y" || option == "y"){
System.out.println("What is the vin number for the car or motorcycle?");
System.out.println("What is the vin number for the car or motorcycle?");
inform.vin = keyboard.nextLine();
System.out.println("What is the color of the vehicle?");
inform.color = keyboard.nextLine();
System.out.println("What is the year of the vehicle?");
inform.year = keyboard.nextInt();
System.out.println("What is the make of the vehicle?");
inform.make = keyboard.nextLine();
System.out.println("What is the model of the vehicle?");
inform.model = keyboard.nextLine();
System.out.println("Is the vehicle a car? Y/N");
choice = keyboard.nextLine();
if (choice == "Y" || choice == "y"){
System.out.println("How many passengers can legally ride in the car?");
inform.passengers = keyboard.nextInt();
System.out.println("How many doors does the car have?");
inform.doors = keyboard.nextInt();
}
else{
System.out.println("Does the motorcycle have a sidecar? Y/N");
inform.sideCar = keyboard.nextLine();
}
array.insert(newNode);
}
else{
System.out.println("What is the vin number for the car or motorcycle?");
array.fetch(inform.vin);
}
//
case 2:
//
System.out.println("*** TASK: TEST FOR DATA ENCAPSULATION ***");
case 3:
//
case 4:
//
case 5:
//
case 6:
//
}
}
}
}
***VehicleUnsortedOptimizedArray***
public class SP2017LAB3_VehicleUnsortedOptimizedArray {
private int next;
private int size;
private SP2017LAB3_Vehicle[] data;
public SP2017LAB3_VehicleUnsortedOptimizedArray(){
next = 0;
size = 25;
data = new SP2017LAB3_Vehicle[size];
}
public boolean insert(SP2017LAB3_Vehicle newNode){
if (next >= size)
return false;
data[next] = newNode.deepCopy();
if(data[next] == null)
return false;
next = next +1;
return true;
}
public SP2017LAB3_Vehicle fetch(String targetKey){
SP2017LAB3_Vehicle node;
SP2017LAB3_Vehicle temp;
int i = 0;
while(i< next && !(data[i].compareTo(targetKey) == 0)){
i++;
}
if(i== next)
return null;
node = data[i].deepCopy();
if(i != 0){
temp = data[i - 1];
data[i - 1] = data[i];
data[i] = temp;
}
return node;
}
public boolean delete(String targetKey){
int i = 0;
while(i < next && !(data[i].compareTo(targetKey) == 0)){
i++;
}
if(i == next)
return false;
data[i] = data[next - 1];
data[next - 1] = null;
next = next - 1;
return true;
}
public boolean update(String targetKey, SP2017LAB3_Vehicle newNode){
if(delete(targetKey) == false)
return false;
else if(insert(newNode) == false)
return false;
else
return true;
}
}
COSC2436 – Lab3
1
Solution
A)
import java.util.Scanner;
public class SP2017LAB3_Vehicle{
private static Scanner keyboard = new Scanner(System.in);
protected String vin, model, sideCar;
protected String color;
protected String make;
protected int year, miles, passengers, doors;
public SP2017LAB3_Vehicle() {
vin = null;
model = null;
color = null;
make = null;
year = 0;
miles = 0;
}
//parameter constructor
public SP2017LAB3_Vehicle(String vin, String model, String color, String make,
int year, int miles){
this.vin = vin;
this.model = model;
this.color = color;
this.make = make;
this.year = year;
this.miles = miles;
}
public void setVin(String vin){
this.vin = vin;
}
public String getVin(){
return vin;
}
public void setColor(String color){
this.color = color;
}
public String getColor(){
return color;
}
public void setMake(String make){
this.make = make;
}
public String getMake(){
return make;
}
public void setYear(int year){
this.year = year;
}
public int getYear(){
return year;
}
public void setMiles(int miles){
this.miles = miles;
}
public int getMiles(){
return miles;
}
public void forward(){
System.out.println("How far forward would you like to go?");
miles = keyboard.nextInt();
System.out.println("Move forward " + miles + " mile(s)");
}
public void backward(){
System.out.println("How far backward would you like to go?");
miles = keyboard.nextInt();
System.out.println("Move backward " + miles + " mile(s)");
}
public void left(){
System.out.println("Turn left");
}
public void right(){
System.out.println("Turn right");
}
public String toString() {
String infoOutput = "VIN:t" + vin + " Color:t" + color + " Year:t";
return infoOutput;
}
public SP2017LAB3_Vehicle deepCopy(){
SP2017LAB3_Vehicle clone = new SP2017LAB3_Vehicle(vin, model, color, make, year,
miles);
return clone;
}
public int compareTo(String targetKey){
return(vin.compareTo(targetKey));
}
}
import java.util.Scanner;
public class SP2017LAB3_Car extends SP2017LAB3_Vehicle{
private static Scanner keyboard = new Scanner(System.in);
int doors;
int passengers;
public SP2017LAB3_Car() {
super();
doors = 0;
passengers = 0;
}
public SP2017LAB3_Car(String vin, String model, String color, String make,
int year, int miles, int door, int passenger){
super(vin, model, color, make, year, miles);
doors = door;
passengers = passenger;
}
public int getDoors(){
return doors;
}
public void setDoors(int door){
doors = door;
}
public int getPassengers(){
return passengers;
}
public void setPassengers(int passenger){
passengers = passenger;
}
public void printCar(){
super.toString();
System.out.println("Car make: t" + make + " Model: t" + model + " Number of
passengers: " + passengers +
" Number of doors: " + doors);
}
public void carInfo(){
System.out.println("How many passengers can legally ride in the car?");
passengers = keyboard.nextInt();
System.out.println("How many doors does the car have?");
doors = keyboard.nextInt();
}
}
import java.util.Scanner;
public class SP2017LAB3_Motorcycle extends SP2017LAB3_Vehicle {
private static Scanner keyboard = new Scanner(System.in);
boolean sideCars;
String hasSideCar;
public SP2017LAB3_Motorcycle (){
super();
sideCars = false;
}
public SP2017LAB3_Motorcycle (String vin, String model, String color, String make,
int year, int miles) {
super(vin, model, color, make, year, miles);
sideCars = false;
}
public void setSideCars(boolean sideCar){
sideCars = sideCar;
}
public boolean getSideCars(){
return sideCars;
}
public void printMotorcycle(){
super.toString();
if (sideCars == true){
hasSideCar = "Yes";
}
else{
hasSideCar = "No";
}
System.out.println("Motorcycle make: t" + make + " Model: t" + model + " Has side car:
" + hasSideCar);
}
}
import java.util.Scanner;
//
public class SP2017LAB3_VehicleDealerShop {
static SP2017LAB3_Vehicle newNode = null;
static String option = null, choice = null;
//
private static Scanner keyboard = new Scanner(System.in);
//
public static void main(String[]args){
//
SP2017LAB3_Vehicle inform = new SP2017LAB3_Vehicle();
//
SP2017LAB3_VehicleUnsortedOptimizedArray array = new
SP2017LAB3_VehicleUnsortedOptimizedArray();
while(true){
//
System.out.println("1: Insert a car or motorcycle");
System.out.println("2. Test for the encapsulation of the data structure");
System.out.println("3. Remove a car or motorcycle");
System.out.println("4. Update information of a car or motorcycle");
System.out.println("5. Show all vehicles");
System.out.println("6. Exit");
//
int selection = Integer.parseInt(keyboard.nextLine());
//
switch(selection){
case 1:
//
System.out.println("*** TASK: INSERT and FETCH A CAR OR A MOTORCYCLE ***");
System.out.println("Do you wish to insert a car or motorcycle? Y/N");
option = keyboard.nextVehicleDealerShopLine();
if (option == "Y" || option == "y"){
System.out.println("What is the vin number for the car or motorcycle?");
System.out.println("What is the vin number for the car or motorcycle?");
inform.vin = keyboard.nextLine();
System.out.println("What is the color of the vehicle?");
inform.color = keyboard.nextLine();
System.out.println("What is the year of the vehicle?");
inform.year = keyboard.nextInt();
System.out.println("What is the make of the vehicle?");
inform.make = keyboard.nextLine();
System.out.println("What is the model of the vehicle?");
inform.model = keyboard.nextLine();
System.out.println("Is the vehicle a car? Y/N");
choice = keyboard.nextLine();
if (choice == "Y" || choice == "y"){
System.out.println("How many passengers can legally ride in the car?");
inform.passengers = keyboard.nextInt();
System.out.println("How many doors does the car have?");
inform.doors = keyboard.nextInt();
}
else{
System.out.println("Does the motorcycle have a sidecar? Y/N");
inform.sideCar = keyboard.nextLine();
}
array.insert(newNode);
}
else{
System.out.println("What is the vin number for the car or motorcycle?");
array.fetch(inform.vin);
}
//
case 2:
System.out.println("*** TASK: TEST FOR DATA ENCAPSULATION ***");
case3:
//
}
}
}
}
public class SP2017LAB3_VehicleUnsortedOptimizedArray {
private int next;
private int size;
private SP2017LAB3_Vehicle[] data;
public SP2017LAB3_VehicleUnsortedOptimizedArray(){
next = 0;
size = 25;
data = new SP2017LAB3_Vehicle[size];
}
public boolean insert(SP2017LAB3_Vehicle newNode){
if (next >= size)
return false;
data[next] = newNode.deepCopy();
if(data[next] == null)
return false;
next = next +1;
return true;
}
public SP2017LAB3_Vehicle fetch(String targetKey){
SP2017LAB3_Vehicle node;
SP2017LAB3_Vehicle temp;
int i = 0;
while(i< next && !(data[i].compareTo(targetKey) == 0)){
i++;
}
if(i== next)
return null;
node = data[i].deepCopy();
if(i != 0){
temp = data[i - 1];
data[i - 1] = data[i];
data[i] = temp;
}
return node;
}
public boolean delete(String targetKey){
int i = 0;
while(i < next && !(data[i].compareTo(targetKey) == 0)){
i++;
}
if(i == next)
return false;
data[i] = data[next - 1];
data[next - 1] = null;
next = next - 1;
return true;
}
ReactDEEP.DEEPCopyNode(editorState.getSelection().getStartKey())
return true;
}
}

More Related Content

Similar to This is the assignmentOBJECTIVESAfter finishing this lab, stude.pdf

Public class race track {public static void main(string[] args
Public class race track {public static void main(string[] argsPublic class race track {public static void main(string[] args
Public class race track {public static void main(string[] argsYASHU40
 
Object Oriented Programming - 5.1. Array
Object Oriented Programming - 5.1. ArrayObject Oriented Programming - 5.1. Array
Object Oriented Programming - 5.1. ArrayAndiNurkholis1
 
Goal The goal of this assignment is to help students understand the.pdf
Goal The goal of this assignment is to help students understand the.pdfGoal The goal of this assignment is to help students understand the.pdf
Goal The goal of this assignment is to help students understand the.pdfarsmobiles
 
Competition 1 (blog 1)
Competition 1 (blog 1)Competition 1 (blog 1)
Competition 1 (blog 1)TarunPaparaju
 
Please the following is the currency class of perious one- class Curre.pdf
Please the following is the currency class of perious one- class Curre.pdfPlease the following is the currency class of perious one- class Curre.pdf
Please the following is the currency class of perious one- class Curre.pdfadmin463580
 
R, Scikit-Learn and Apache Spark ML - What difference does it make?
R, Scikit-Learn and Apache Spark ML - What difference does it make?R, Scikit-Learn and Apache Spark ML - What difference does it make?
R, Scikit-Learn and Apache Spark ML - What difference does it make?Villu Ruusmann
 
SenchaCon 2016: Developing COSMOS Using Sencha Ext JS 5 - Shenglin Xu
SenchaCon 2016: Developing COSMOS Using Sencha Ext JS 5 - Shenglin XuSenchaCon 2016: Developing COSMOS Using Sencha Ext JS 5 - Shenglin Xu
SenchaCon 2016: Developing COSMOS Using Sencha Ext JS 5 - Shenglin XuSencha
 
exercises_for_live_coding_Java_advanced-2.pdf
exercises_for_live_coding_Java_advanced-2.pdfexercises_for_live_coding_Java_advanced-2.pdf
exercises_for_live_coding_Java_advanced-2.pdfenodani2008
 
hello- please dont just copy from other answers- the following is the.docx
hello- please dont just copy from other answers- the following is the.docxhello- please dont just copy from other answers- the following is the.docx
hello- please dont just copy from other answers- the following is the.docxIsaac9LjWelchq
 
IBM SpaceX Capstone Project
IBM SpaceX Capstone ProjectIBM SpaceX Capstone Project
IBM SpaceX Capstone ProjectYousefElbayomi
 
College for Women Department of Information Science
College for Women  Department of Information Science  College for Women  Department of Information Science
College for Women Department of Information Science WilheminaRossi174
 
College for women department of information science
College for women  department of information science  College for women  department of information science
College for women department of information science AMMY30
 
A machine learning model for average fuel consumption in heavy vehicles
A machine learning model for average fuel consumption in heavy vehiclesA machine learning model for average fuel consumption in heavy vehicles
A machine learning model for average fuel consumption in heavy vehiclesVenkat Projects
 
Vehicle Parking System Project
Vehicle Parking System ProjectVehicle Parking System Project
Vehicle Parking System ProjectFarooq Mian
 
Create a system to simulate vehicles at an intersection. Assume th.pdf
Create a system to simulate vehicles at an intersection. Assume th.pdfCreate a system to simulate vehicles at an intersection. Assume th.pdf
Create a system to simulate vehicles at an intersection. Assume th.pdfarchanacomputers1
 

Similar to This is the assignmentOBJECTIVESAfter finishing this lab, stude.pdf (20)

Java doc Pr ITM2
Java doc Pr ITM2Java doc Pr ITM2
Java doc Pr ITM2
 
Public class race track {public static void main(string[] args
Public class race track {public static void main(string[] argsPublic class race track {public static void main(string[] args
Public class race track {public static void main(string[] args
 
Object Oriented Programming - 5.1. Array
Object Oriented Programming - 5.1. ArrayObject Oriented Programming - 5.1. Array
Object Oriented Programming - 5.1. Array
 
Goal The goal of this assignment is to help students understand the.pdf
Goal The goal of this assignment is to help students understand the.pdfGoal The goal of this assignment is to help students understand the.pdf
Goal The goal of this assignment is to help students understand the.pdf
 
Competition 1 (blog 1)
Competition 1 (blog 1)Competition 1 (blog 1)
Competition 1 (blog 1)
 
Please the following is the currency class of perious one- class Curre.pdf
Please the following is the currency class of perious one- class Curre.pdfPlease the following is the currency class of perious one- class Curre.pdf
Please the following is the currency class of perious one- class Curre.pdf
 
R, Scikit-Learn and Apache Spark ML - What difference does it make?
R, Scikit-Learn and Apache Spark ML - What difference does it make?R, Scikit-Learn and Apache Spark ML - What difference does it make?
R, Scikit-Learn and Apache Spark ML - What difference does it make?
 
SenchaCon 2016: Developing COSMOS Using Sencha Ext JS 5 - Shenglin Xu
SenchaCon 2016: Developing COSMOS Using Sencha Ext JS 5 - Shenglin XuSenchaCon 2016: Developing COSMOS Using Sencha Ext JS 5 - Shenglin Xu
SenchaCon 2016: Developing COSMOS Using Sencha Ext JS 5 - Shenglin Xu
 
exercises_for_live_coding_Java_advanced-2.pdf
exercises_for_live_coding_Java_advanced-2.pdfexercises_for_live_coding_Java_advanced-2.pdf
exercises_for_live_coding_Java_advanced-2.pdf
 
L9
L9L9
L9
 
hello- please dont just copy from other answers- the following is the.docx
hello- please dont just copy from other answers- the following is the.docxhello- please dont just copy from other answers- the following is the.docx
hello- please dont just copy from other answers- the following is the.docx
 
IBM SpaceX Capstone Project
IBM SpaceX Capstone ProjectIBM SpaceX Capstone Project
IBM SpaceX Capstone Project
 
Vb net1
Vb net1Vb net1
Vb net1
 
C# Programming Help
C# Programming HelpC# Programming Help
C# Programming Help
 
College for Women Department of Information Science
College for Women  Department of Information Science  College for Women  Department of Information Science
College for Women Department of Information Science
 
College for women department of information science
College for women  department of information science  College for women  department of information science
College for women department of information science
 
OOP Assignment 03.pdf
OOP Assignment 03.pdfOOP Assignment 03.pdf
OOP Assignment 03.pdf
 
A machine learning model for average fuel consumption in heavy vehicles
A machine learning model for average fuel consumption in heavy vehiclesA machine learning model for average fuel consumption in heavy vehicles
A machine learning model for average fuel consumption in heavy vehicles
 
Vehicle Parking System Project
Vehicle Parking System ProjectVehicle Parking System Project
Vehicle Parking System Project
 
Create a system to simulate vehicles at an intersection. Assume th.pdf
Create a system to simulate vehicles at an intersection. Assume th.pdfCreate a system to simulate vehicles at an intersection. Assume th.pdf
Create a system to simulate vehicles at an intersection. Assume th.pdf
 

More from bharatchawla141

Explain how HPV leads to cervical cancer and oral cancer. Include.pdf
Explain how HPV leads to cervical cancer and oral cancer. Include.pdfExplain how HPV leads to cervical cancer and oral cancer. Include.pdf
Explain how HPV leads to cervical cancer and oral cancer. Include.pdfbharatchawla141
 
Consider L = {a^nb^2nc^P p 0}. Prove L is not a context-free langu.pdf
Consider L = {a^nb^2nc^P  p  0}. Prove L is not a context-free langu.pdfConsider L = {a^nb^2nc^P  p  0}. Prove L is not a context-free langu.pdf
Consider L = {a^nb^2nc^P p 0}. Prove L is not a context-free langu.pdfbharatchawla141
 
Differentiate between analog and digital signals.SolutionIn ana.pdf
Differentiate between analog and digital signals.SolutionIn ana.pdfDifferentiate between analog and digital signals.SolutionIn ana.pdf
Differentiate between analog and digital signals.SolutionIn ana.pdfbharatchawla141
 
describe two properties of iPS and ES cells, including the meaning i.pdf
describe two properties of iPS and ES cells, including the meaning i.pdfdescribe two properties of iPS and ES cells, including the meaning i.pdf
describe two properties of iPS and ES cells, including the meaning i.pdfbharatchawla141
 
Coffman Company issued 1,000,000 10 year 10 percent bonds January 1,.pdf
Coffman Company issued 1,000,000 10 year 10 percent bonds January 1,.pdfCoffman Company issued 1,000,000 10 year 10 percent bonds January 1,.pdf
Coffman Company issued 1,000,000 10 year 10 percent bonds January 1,.pdfbharatchawla141
 
A JAR file contains an image named images Fall.png. Java class na.pdf
A JAR file contains an image named images Fall.png. Java class na.pdfA JAR file contains an image named images Fall.png. Java class na.pdf
A JAR file contains an image named images Fall.png. Java class na.pdfbharatchawla141
 
A 71-year-old male patient comes to the hospital after having been p.pdf
A 71-year-old male patient comes to the hospital after having been p.pdfA 71-year-old male patient comes to the hospital after having been p.pdf
A 71-year-old male patient comes to the hospital after having been p.pdfbharatchawla141
 
You are carrying out experiments in cell fusion by fusing together ce.pdf
You are carrying out experiments in cell fusion by fusing together ce.pdfYou are carrying out experiments in cell fusion by fusing together ce.pdf
You are carrying out experiments in cell fusion by fusing together ce.pdfbharatchawla141
 
Write an MPI program that implements a shell-sort like parallel algo.pdf
Write an MPI program that implements a shell-sort like parallel algo.pdfWrite an MPI program that implements a shell-sort like parallel algo.pdf
Write an MPI program that implements a shell-sort like parallel algo.pdfbharatchawla141
 
Which of the following are roles of proteins Pick ALL that apply..pdf
Which of the following are roles of proteins Pick ALL that apply..pdfWhich of the following are roles of proteins Pick ALL that apply..pdf
Which of the following are roles of proteins Pick ALL that apply..pdfbharatchawla141
 
When are a persons fellowship, autonomy, and competence face threa.pdf
When are a persons fellowship, autonomy, and competence face threa.pdfWhen are a persons fellowship, autonomy, and competence face threa.pdf
When are a persons fellowship, autonomy, and competence face threa.pdfbharatchawla141
 
What is the function in homworts Where can one find homwortsS.pdf
What is the function  in homworts  Where can one find homwortsS.pdfWhat is the function  in homworts  Where can one find homwortsS.pdf
What is the function in homworts Where can one find homwortsS.pdfbharatchawla141
 
Two paragraph opinion about the film editing of the movie LIFE OF .pdf
Two paragraph opinion about the film editing of the movie LIFE OF .pdfTwo paragraph opinion about the film editing of the movie LIFE OF .pdf
Two paragraph opinion about the film editing of the movie LIFE OF .pdfbharatchawla141
 
True or False The aDDM fixes the SV reference problem by assuming t.pdf
True or False The aDDM fixes the SV reference problem by assuming t.pdfTrue or False The aDDM fixes the SV reference problem by assuming t.pdf
True or False The aDDM fixes the SV reference problem by assuming t.pdfbharatchawla141
 
The number of visits to public libraries increased from 1.4 billion i.pdf
The number of visits to public libraries increased from 1.4 billion i.pdfThe number of visits to public libraries increased from 1.4 billion i.pdf
The number of visits to public libraries increased from 1.4 billion i.pdfbharatchawla141
 
The first table contains data of the Student entry. Attributes are Si.pdf
The first table contains data of the Student entry. Attributes are Si.pdfThe first table contains data of the Student entry. Attributes are Si.pdf
The first table contains data of the Student entry. Attributes are Si.pdfbharatchawla141
 
Save for Later 12) Viruses, adware and spyware are referred to collec.pdf
Save for Later 12) Viruses, adware and spyware are referred to collec.pdfSave for Later 12) Viruses, adware and spyware are referred to collec.pdf
Save for Later 12) Viruses, adware and spyware are referred to collec.pdfbharatchawla141
 
Sustainability Sustainability is an important consideration for any.pdf
Sustainability Sustainability is an important consideration for any.pdfSustainability Sustainability is an important consideration for any.pdf
Sustainability Sustainability is an important consideration for any.pdfbharatchawla141
 
Research health data stewardship and in your post show why it is imp.pdf
Research health data stewardship and in your post show why it is imp.pdfResearch health data stewardship and in your post show why it is imp.pdf
Research health data stewardship and in your post show why it is imp.pdfbharatchawla141
 
Read carefully. Im not sure if the point class is correct but postin.pdf
Read carefully. Im not sure if the point class is correct but postin.pdfRead carefully. Im not sure if the point class is correct but postin.pdf
Read carefully. Im not sure if the point class is correct but postin.pdfbharatchawla141
 

More from bharatchawla141 (20)

Explain how HPV leads to cervical cancer and oral cancer. Include.pdf
Explain how HPV leads to cervical cancer and oral cancer. Include.pdfExplain how HPV leads to cervical cancer and oral cancer. Include.pdf
Explain how HPV leads to cervical cancer and oral cancer. Include.pdf
 
Consider L = {a^nb^2nc^P p 0}. Prove L is not a context-free langu.pdf
Consider L = {a^nb^2nc^P  p  0}. Prove L is not a context-free langu.pdfConsider L = {a^nb^2nc^P  p  0}. Prove L is not a context-free langu.pdf
Consider L = {a^nb^2nc^P p 0}. Prove L is not a context-free langu.pdf
 
Differentiate between analog and digital signals.SolutionIn ana.pdf
Differentiate between analog and digital signals.SolutionIn ana.pdfDifferentiate between analog and digital signals.SolutionIn ana.pdf
Differentiate between analog and digital signals.SolutionIn ana.pdf
 
describe two properties of iPS and ES cells, including the meaning i.pdf
describe two properties of iPS and ES cells, including the meaning i.pdfdescribe two properties of iPS and ES cells, including the meaning i.pdf
describe two properties of iPS and ES cells, including the meaning i.pdf
 
Coffman Company issued 1,000,000 10 year 10 percent bonds January 1,.pdf
Coffman Company issued 1,000,000 10 year 10 percent bonds January 1,.pdfCoffman Company issued 1,000,000 10 year 10 percent bonds January 1,.pdf
Coffman Company issued 1,000,000 10 year 10 percent bonds January 1,.pdf
 
A JAR file contains an image named images Fall.png. Java class na.pdf
A JAR file contains an image named images Fall.png. Java class na.pdfA JAR file contains an image named images Fall.png. Java class na.pdf
A JAR file contains an image named images Fall.png. Java class na.pdf
 
A 71-year-old male patient comes to the hospital after having been p.pdf
A 71-year-old male patient comes to the hospital after having been p.pdfA 71-year-old male patient comes to the hospital after having been p.pdf
A 71-year-old male patient comes to the hospital after having been p.pdf
 
You are carrying out experiments in cell fusion by fusing together ce.pdf
You are carrying out experiments in cell fusion by fusing together ce.pdfYou are carrying out experiments in cell fusion by fusing together ce.pdf
You are carrying out experiments in cell fusion by fusing together ce.pdf
 
Write an MPI program that implements a shell-sort like parallel algo.pdf
Write an MPI program that implements a shell-sort like parallel algo.pdfWrite an MPI program that implements a shell-sort like parallel algo.pdf
Write an MPI program that implements a shell-sort like parallel algo.pdf
 
Which of the following are roles of proteins Pick ALL that apply..pdf
Which of the following are roles of proteins Pick ALL that apply..pdfWhich of the following are roles of proteins Pick ALL that apply..pdf
Which of the following are roles of proteins Pick ALL that apply..pdf
 
When are a persons fellowship, autonomy, and competence face threa.pdf
When are a persons fellowship, autonomy, and competence face threa.pdfWhen are a persons fellowship, autonomy, and competence face threa.pdf
When are a persons fellowship, autonomy, and competence face threa.pdf
 
What is the function in homworts Where can one find homwortsS.pdf
What is the function  in homworts  Where can one find homwortsS.pdfWhat is the function  in homworts  Where can one find homwortsS.pdf
What is the function in homworts Where can one find homwortsS.pdf
 
Two paragraph opinion about the film editing of the movie LIFE OF .pdf
Two paragraph opinion about the film editing of the movie LIFE OF .pdfTwo paragraph opinion about the film editing of the movie LIFE OF .pdf
Two paragraph opinion about the film editing of the movie LIFE OF .pdf
 
True or False The aDDM fixes the SV reference problem by assuming t.pdf
True or False The aDDM fixes the SV reference problem by assuming t.pdfTrue or False The aDDM fixes the SV reference problem by assuming t.pdf
True or False The aDDM fixes the SV reference problem by assuming t.pdf
 
The number of visits to public libraries increased from 1.4 billion i.pdf
The number of visits to public libraries increased from 1.4 billion i.pdfThe number of visits to public libraries increased from 1.4 billion i.pdf
The number of visits to public libraries increased from 1.4 billion i.pdf
 
The first table contains data of the Student entry. Attributes are Si.pdf
The first table contains data of the Student entry. Attributes are Si.pdfThe first table contains data of the Student entry. Attributes are Si.pdf
The first table contains data of the Student entry. Attributes are Si.pdf
 
Save for Later 12) Viruses, adware and spyware are referred to collec.pdf
Save for Later 12) Viruses, adware and spyware are referred to collec.pdfSave for Later 12) Viruses, adware and spyware are referred to collec.pdf
Save for Later 12) Viruses, adware and spyware are referred to collec.pdf
 
Sustainability Sustainability is an important consideration for any.pdf
Sustainability Sustainability is an important consideration for any.pdfSustainability Sustainability is an important consideration for any.pdf
Sustainability Sustainability is an important consideration for any.pdf
 
Research health data stewardship and in your post show why it is imp.pdf
Research health data stewardship and in your post show why it is imp.pdfResearch health data stewardship and in your post show why it is imp.pdf
Research health data stewardship and in your post show why it is imp.pdf
 
Read carefully. Im not sure if the point class is correct but postin.pdf
Read carefully. Im not sure if the point class is correct but postin.pdfRead carefully. Im not sure if the point class is correct but postin.pdf
Read carefully. Im not sure if the point class is correct but postin.pdf
 

Recently uploaded

Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptNishitharanjan Rout
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxAdelaideRefugio
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesPooky Knightsmith
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi RajagopalEADTU
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMELOISARIVERA8
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjMohammed Sikander
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project researchCaitlinCummins3
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxLimon Prince
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MysoreMuleSoftMeetup
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...Nguyen Thanh Tu Collection
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppCeline George
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17Celine George
 

Recently uploaded (20)

Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
Observing-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptxObserving-Correct-Grammar-in-Making-Definitions.pptx
Observing-Correct-Grammar-in-Making-Definitions.pptx
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
e-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopale-Sealing at EADTU by Kamakshi Rajagopal
e-Sealing at EADTU by Kamakshi Rajagopal
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptxAnalyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
Analyzing and resolving a communication crisis in Dhaka textiles LTD.pptx
 
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
MuleSoft Integration with AWS Textract | Calling AWS Textract API |AWS - Clou...
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"Mattingly "AI & Prompt Design: Named Entity Recognition"
Mattingly "AI & Prompt Design: Named Entity Recognition"
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 

This is the assignmentOBJECTIVESAfter finishing this lab, stude.pdf

  • 1. This is the assignment: OBJECTIVES After finishing this lab, students can have the following: Understand how to declare an unsorted-optimized array data structure Know how to insert nodes to the structure, fetch a node with a key field of node, update the information of a node and delete a node from the structure Verify that the nodes in the unsorted-optimized array data structure are fully encapsulated. Students will be familiar with the ArrayList and apply all the basic operation to access nodes Also, students recognize that ArrayList is a heterogeneous data structure that can store nodes of any type of objects. REQUIREMENT STATEMENT A car dealer needs an application that can help the shop to do the following tasks: 1.Insert a car or a motocycle 2.Test for the encapsulation of the data structure 3.Remove a car or a motocycle 4.Update information of a car or a motocycle 5.Show All vehicles 6.Exit Also, the owner of the shop asks for: -Using the Unsorted Optimized Array data structure for the application and apply Inheritance and polymorphism of Object Oriented Programming -Requiement for output: The car’s information is displayed as below (for example) VIN: 123A456B Color: White Year: 2014 Car make: Toyota Model: Sienna Number of passengers: 8 Number of doors: 4 The motocycle’s information is displayed as below (for example VIN: 321BC654 Color: Grey Year: 2015 Motocycle make: Honda Model: PCX150 Has side car: no -After a task from the menu, the application should allow users to continue using the application and only terminate when users select Exit COSC2436 – Lab3
  • 2. 1 TASK INSERT -Display the message: “*** TASK: INSERT and FETCH A CAR OR A MOTOCYCLE ***” -Allow users to enter the information of a car or a motocyle from the keyboard -Insert the car/motocycle to the data structure -Fetch the information of car/motocycle by its VIN from the data structure that have entered to the structure to ensure that the car/motocycle is in the structure TEST FOR ENCAPSULATION -Display the message: “*** TASK: TEST FOR DATA ENCAPSULATION ***” -Create a test car with the following information typed from the keyboard: -Insert this test car to the data structure -Modify the the color of the test car with different color -Declare an object of car named “copy” and assign the node that is fetched from the data structure with the target key as VIN of test car -Display information of the object named copy -Compare the color of test car with the color of object copy. If they are different then display the message: “The Unsorted Optimized Array structure has the encapsulation”; otherwise display “The Unsorted Optimized Array structure does not have the encapsulation” TASK UPDATE -Display: “***TASK: UPDATE INFORMATION OF A CAR OR A MOTOCYCLE *** “ - Create an object of class Car named newNode -Fetch a node with the VIN is the same VIN of test car then assign to newNode, therefore, the newNode has the same VIN with the test car -Change the color of the newNode to different color -Update the data structure with with the newNode -Fetch with the key as the key of test car. If the node resulted from fetch has different color from the test car the display the message “Update test car successfully”; otherwise display “Update test car failed” TASK DELETE -Display: “ *** TASK: DELETE A CAR OR A MOTOCYCLE ***” -Delete the node with the VIN as SP2017 that was not inserted to the data structure, print out the result of task delete (output: false) -Delete the node with the VIN of the above test car, print the result (output: true) -Fetch with the key as the VIN of the test car, print out the result (output: null) TASK SHOW ALL -Call showAll to display all nodes on the data structure
  • 3. WHAT WE NEED TO KNOW TO DO THE PROGRAM -Review how to declare the Inheritance relationship between 2 classes -How to write the constructor, toString or other methods of child classes to inherit from the super class -How to apply polymorphism to the main -Understand what is Unsorted Optimized Array structure, how initialize the Unsorted Optimized Array data structure -How 4 operations of Unsorted Optimized Array structure work UML and PSUEDO-CODE You should provide the UML of super class, and 2 child classes The pseudo-code is provided in the requirement, you do not need to rewrite; just follow step by step to write the code COSC2436 – Lab3 2 HOW TO DO THE LAB part1 -After provide UML and read the pseudo-code, start the Java editor -Create the project name SP2017LAB3_PART1_yourLastname -Add super class named SP2017LAB3_Vehicle_yourLastname that maintain Vin number, color, make, model, year. It also has some methods, such as, mutator, accessor, and toString, method forward (accept the amount of distance in miles, for example, 25, then display “move forward 25 miles”), method backward (accept the amount of distance in miles, for example 3 then display the message “move backward 3 miles”), turn left (display word “Turn left”) and turn right (display word “Turn Rright”) -Add child class named SP2017LAB3_Car_yourLastName inherits from above class Vehicle. It has more data members, such as, number of passengers, number of doors -Add child class named SP2017LAB3_Motocycle_yourLastName inherits from above class Vehicle. It has more data members, such as, has side car (boolean) -Add a data structure class named SP2017LAB3_VehicleUnsortedOptimizedArray_yourLastName that maintain size(int), a vehicle array and next (int) to hold the location where the new node is inserted to the structure. Also, the class has the methods for 4 operations: insert, fetch, delete, update and showAll that display all the nodes in the structure. ( see the code on page 103 for your reference) -Add a driver class name SP2017LAB3_VehicleDealerShop_yourLastname that do the requirement asking for PART2: OBJECTIVES: Practice using Java ArrayList class. REQUIREMENT and HOW TO DO THE LAB PART2
  • 4. Add the following part to the previous project with the following step by strep (pseudo-code) -Declare a data structure of ArrayList with the size 25 -Insert 3 cars/motocycles with information that are entered from the keyboard -Show all 3 nodes that have inserted to the ArrayList data structure -Use a for loop to insert number 1 to 100 to the above data structure of ArrayList -Display the size of the above ArrayList. -Remove the one above car/motocycle from the ArrayList data structure with one of the VIN displyed at above showAll(). Then display the size of the ArrayList structure -Get and display the information of nodes at the location 45. Change the value at location 45 to 2016. Display the information at location 45 again -Use JOptionPane to display the message: “Congratulation! You are successful on ArrayList with four operations: add, get, remove and set” This is the code I have so far: ***Vehicle Class*** import java.util.Scanner; public class SP2017LAB3_Vehicle{ // private static Scanner keyboard = new Scanner(System.in); protected String vin, model, sideCar; protected String color; protected String make; protected int year, miles, passengers, doors; // default constructor public SP2017LAB3_Vehicle() { vin = null; model = null; color = null; make = null; year = 0; miles = 0; } //parameter constructor public SP2017LAB3_Vehicle(String vin, String model, String color, String make,
  • 5. int year, int miles){ this.vin = vin; this.model = model; this.color = color; this.make = make; this.year = year; this.miles = miles; } // mutator method public void setVin(String vin){ this.vin = vin; } // accessor method public String getVin(){ return vin; } public void setColor(String color){ this.color = color; } public String getColor(){ return color; } public void setMake(String make){ this.make = make; } public String getMake(){ return make;
  • 6. } public void setYear(int year){ this.year = year; } public int getYear(){ return year; } public void setMiles(int miles){ this.miles = miles; } public int getMiles(){ return miles; } public void forward(){ System.out.println("How far forward would you like to go?"); miles = keyboard.nextInt(); System.out.println("Move forward " + miles + " mile(s)"); } public void backward(){ System.out.println("How far backward would you like to go?"); miles = keyboard.nextInt(); System.out.println("Move backward " + miles + " mile(s)"); } public void left(){ System.out.println("Turn left"); } public void right(){
  • 7. System.out.println("Turn right"); } // Standard output list public String toString() { String infoOutput = "VIN:t" + vin + " Color:t" + color + " Year:t"; return infoOutput; } public SP2017LAB3_Vehicle deepCopy(){ SP2017LAB3_Vehicle clone = new SP2017LAB3_Vehicle(vin, model, color, make, year, miles); return clone; } public int compareTo(String targetKey){ return(vin.compareTo(targetKey)); } } ***Car*** import java.util.Scanner; public class SP2017LAB3_Car extends SP2017LAB3_Vehicle{ private static Scanner keyboard = new Scanner(System.in); int doors; int passengers; public SP2017LAB3_Car() { super(); doors = 0; passengers = 0; } // public SP2017LAB3_Car(String vin, String model, String color, String make,
  • 8. int year, int miles, int door, int passenger){ super(vin, model, color, make, year, miles); doors = door; passengers = passenger; } public int getDoors(){ return doors; } public void setDoors(int door){ doors = door; } public int getPassengers(){ return passengers; } public void setPassengers(int passenger){ passengers = passenger; } public void printCar(){ super.toString(); System.out.println("Car make: t" + make + " Model: t" + model + " Number of passengers: " + passengers + " Number of doors: " + doors); } public void carInfo(){ System.out.println("How many passengers can legally ride in the car?"); passengers = keyboard.nextInt(); System.out.println("How many doors does the car have?"); doors = keyboard.nextInt(); } }
  • 9. ***Motorcycle*** import java.util.Scanner; publicclass SP2017LAB3_Motorcycle extends SP2017LAB3_Vehicle { privatestatic Scanner keyboard = new Scanner(System.in); boolean sideCars; String hasSideCar; public SP2017LAB3_Motorcycle (){ super(); sideCars = false; } public SP2017LAB3_Motorcycle (String vin, String model, String color, String make, int year, int miles) { super(vin, model, color, make, year, miles); sideCars = false; } publicvoid setSideCars(boolean sideCar){ sideCars = sideCar; } publicboolean getSideCars(){ return sideCars; } publicvoid printMotorcycle(){ super.toString(); if (sideCars == true){ hasSideCar = "Yes"; } else{ hasSideCar = "No";
  • 10. } System.out.println("Motorcycle make: t" + make + " Model: t" + model + " Has side car: " + hasSideCar); } } ***VehicleDealerShop*** import java.util.Scanner; // public class SP2017LAB3_VehicleDealerShop { static SP2017LAB3_Vehicle newNode = null; static String option = null, choice = null; // private static Scanner keyboard = new Scanner(System.in); // public static void main(String[]args){ // SP2017LAB3_Vehicle inform = new SP2017LAB3_Vehicle(); // SP2017LAB3_VehicleUnsortedOptimizedArray array = new SP2017LAB3_VehicleUnsortedOptimizedArray(); while(true){ // System.out.println("1: Insert a car or motorcycle"); System.out.println("2. Test for the encapsulation of the data structure"); System.out.println("3. Remove a car or motorcycle"); System.out.println("4. Update information of a car or motorcycle"); System.out.println("5. Show all vehicles"); System.out.println("6. Exit");
  • 11. // int selection = Integer.parseInt(keyboard.nextLine()); // switch(selection){ case 1: // System.out.println("*** TASK: INSERT and FETCH A CAR OR A MOTORCYCLE ***"); System.out.println("Do you wish to insert a car or motorcycle? Y/N"); option = keyboard.nextVehicleDealerShopLine(); if (option == "Y" || option == "y"){ System.out.println("What is the vin number for the car or motorcycle?"); System.out.println("What is the vin number for the car or motorcycle?"); inform.vin = keyboard.nextLine(); System.out.println("What is the color of the vehicle?"); inform.color = keyboard.nextLine(); System.out.println("What is the year of the vehicle?"); inform.year = keyboard.nextInt(); System.out.println("What is the make of the vehicle?"); inform.make = keyboard.nextLine(); System.out.println("What is the model of the vehicle?"); inform.model = keyboard.nextLine(); System.out.println("Is the vehicle a car? Y/N"); choice = keyboard.nextLine(); if (choice == "Y" || choice == "y"){ System.out.println("How many passengers can legally ride in the car?"); inform.passengers = keyboard.nextInt(); System.out.println("How many doors does the car have?"); inform.doors = keyboard.nextInt(); } else{
  • 12. System.out.println("Does the motorcycle have a sidecar? Y/N"); inform.sideCar = keyboard.nextLine(); } array.insert(newNode); } else{ System.out.println("What is the vin number for the car or motorcycle?"); array.fetch(inform.vin); } // case 2: // System.out.println("*** TASK: TEST FOR DATA ENCAPSULATION ***"); case 3: // case 4: // case 5: // case 6: // } } } } ***VehicleUnsortedOptimizedArray*** public class SP2017LAB3_VehicleUnsortedOptimizedArray { private int next; private int size;
  • 13. private SP2017LAB3_Vehicle[] data; public SP2017LAB3_VehicleUnsortedOptimizedArray(){ next = 0; size = 25; data = new SP2017LAB3_Vehicle[size]; } public boolean insert(SP2017LAB3_Vehicle newNode){ if (next >= size) return false; data[next] = newNode.deepCopy(); if(data[next] == null) return false; next = next +1; return true; } public SP2017LAB3_Vehicle fetch(String targetKey){ SP2017LAB3_Vehicle node; SP2017LAB3_Vehicle temp; int i = 0; while(i< next && !(data[i].compareTo(targetKey) == 0)){ i++; } if(i== next) return null; node = data[i].deepCopy(); if(i != 0){ temp = data[i - 1]; data[i - 1] = data[i]; data[i] = temp;
  • 14. } return node; } public boolean delete(String targetKey){ int i = 0; while(i < next && !(data[i].compareTo(targetKey) == 0)){ i++; } if(i == next) return false; data[i] = data[next - 1]; data[next - 1] = null; next = next - 1; return true; } public boolean update(String targetKey, SP2017LAB3_Vehicle newNode){ if(delete(targetKey) == false) return false; else if(insert(newNode) == false) return false; else return true; } } COSC2436 – Lab3 1 Solution A) import java.util.Scanner; public class SP2017LAB3_Vehicle{ private static Scanner keyboard = new Scanner(System.in);
  • 15. protected String vin, model, sideCar; protected String color; protected String make; protected int year, miles, passengers, doors; public SP2017LAB3_Vehicle() { vin = null; model = null; color = null; make = null; year = 0; miles = 0; } //parameter constructor public SP2017LAB3_Vehicle(String vin, String model, String color, String make, int year, int miles){ this.vin = vin; this.model = model; this.color = color; this.make = make; this.year = year; this.miles = miles; } public void setVin(String vin){ this.vin = vin; } public String getVin(){ return vin; } public void setColor(String color){ this.color = color;
  • 16. } public String getColor(){ return color; } public void setMake(String make){ this.make = make; } public String getMake(){ return make; } public void setYear(int year){ this.year = year; } public int getYear(){ return year; } public void setMiles(int miles){ this.miles = miles; } public int getMiles(){ return miles; } public void forward(){ System.out.println("How far forward would you like to go?"); miles = keyboard.nextInt(); System.out.println("Move forward " + miles + " mile(s)");
  • 17. } public void backward(){ System.out.println("How far backward would you like to go?"); miles = keyboard.nextInt(); System.out.println("Move backward " + miles + " mile(s)"); } public void left(){ System.out.println("Turn left"); } public void right(){ System.out.println("Turn right"); } public String toString() { String infoOutput = "VIN:t" + vin + " Color:t" + color + " Year:t"; return infoOutput; } public SP2017LAB3_Vehicle deepCopy(){ SP2017LAB3_Vehicle clone = new SP2017LAB3_Vehicle(vin, model, color, make, year, miles); return clone; } public int compareTo(String targetKey){ return(vin.compareTo(targetKey)); } } import java.util.Scanner; public class SP2017LAB3_Car extends SP2017LAB3_Vehicle{ private static Scanner keyboard = new Scanner(System.in); int doors; int passengers;
  • 18. public SP2017LAB3_Car() { super(); doors = 0; passengers = 0; } public SP2017LAB3_Car(String vin, String model, String color, String make, int year, int miles, int door, int passenger){ super(vin, model, color, make, year, miles); doors = door; passengers = passenger; } public int getDoors(){ return doors; } public void setDoors(int door){ doors = door; } public int getPassengers(){ return passengers; } public void setPassengers(int passenger){ passengers = passenger; } public void printCar(){ super.toString(); System.out.println("Car make: t" + make + " Model: t" + model + " Number of passengers: " + passengers + " Number of doors: " + doors);
  • 19. } public void carInfo(){ System.out.println("How many passengers can legally ride in the car?"); passengers = keyboard.nextInt(); System.out.println("How many doors does the car have?"); doors = keyboard.nextInt(); } } import java.util.Scanner; public class SP2017LAB3_Motorcycle extends SP2017LAB3_Vehicle { private static Scanner keyboard = new Scanner(System.in); boolean sideCars; String hasSideCar; public SP2017LAB3_Motorcycle (){ super(); sideCars = false; } public SP2017LAB3_Motorcycle (String vin, String model, String color, String make, int year, int miles) { super(vin, model, color, make, year, miles); sideCars = false; } public void setSideCars(boolean sideCar){ sideCars = sideCar; } public boolean getSideCars(){ return sideCars;
  • 20. } public void printMotorcycle(){ super.toString(); if (sideCars == true){ hasSideCar = "Yes"; } else{ hasSideCar = "No"; } System.out.println("Motorcycle make: t" + make + " Model: t" + model + " Has side car: " + hasSideCar); } } import java.util.Scanner; // public class SP2017LAB3_VehicleDealerShop { static SP2017LAB3_Vehicle newNode = null; static String option = null, choice = null; // private static Scanner keyboard = new Scanner(System.in); // public static void main(String[]args){ // SP2017LAB3_Vehicle inform = new SP2017LAB3_Vehicle(); // SP2017LAB3_VehicleUnsortedOptimizedArray array = new SP2017LAB3_VehicleUnsortedOptimizedArray(); while(true){ //
  • 21. System.out.println("1: Insert a car or motorcycle"); System.out.println("2. Test for the encapsulation of the data structure"); System.out.println("3. Remove a car or motorcycle"); System.out.println("4. Update information of a car or motorcycle"); System.out.println("5. Show all vehicles"); System.out.println("6. Exit"); // int selection = Integer.parseInt(keyboard.nextLine()); // switch(selection){ case 1: // System.out.println("*** TASK: INSERT and FETCH A CAR OR A MOTORCYCLE ***"); System.out.println("Do you wish to insert a car or motorcycle? Y/N"); option = keyboard.nextVehicleDealerShopLine(); if (option == "Y" || option == "y"){ System.out.println("What is the vin number for the car or motorcycle?"); System.out.println("What is the vin number for the car or motorcycle?"); inform.vin = keyboard.nextLine(); System.out.println("What is the color of the vehicle?"); inform.color = keyboard.nextLine(); System.out.println("What is the year of the vehicle?"); inform.year = keyboard.nextInt(); System.out.println("What is the make of the vehicle?"); inform.make = keyboard.nextLine(); System.out.println("What is the model of the vehicle?"); inform.model = keyboard.nextLine(); System.out.println("Is the vehicle a car? Y/N"); choice = keyboard.nextLine(); if (choice == "Y" || choice == "y"){ System.out.println("How many passengers can legally ride in the car?"); inform.passengers = keyboard.nextInt();
  • 22. System.out.println("How many doors does the car have?"); inform.doors = keyboard.nextInt(); } else{ System.out.println("Does the motorcycle have a sidecar? Y/N"); inform.sideCar = keyboard.nextLine(); } array.insert(newNode); } else{ System.out.println("What is the vin number for the car or motorcycle?"); array.fetch(inform.vin); } // case 2: System.out.println("*** TASK: TEST FOR DATA ENCAPSULATION ***"); case3: // } } } } public class SP2017LAB3_VehicleUnsortedOptimizedArray { private int next; private int size; private SP2017LAB3_Vehicle[] data; public SP2017LAB3_VehicleUnsortedOptimizedArray(){ next = 0; size = 25;
  • 23. data = new SP2017LAB3_Vehicle[size]; } public boolean insert(SP2017LAB3_Vehicle newNode){ if (next >= size) return false; data[next] = newNode.deepCopy(); if(data[next] == null) return false; next = next +1; return true; } public SP2017LAB3_Vehicle fetch(String targetKey){ SP2017LAB3_Vehicle node; SP2017LAB3_Vehicle temp; int i = 0; while(i< next && !(data[i].compareTo(targetKey) == 0)){ i++; } if(i== next) return null; node = data[i].deepCopy(); if(i != 0){ temp = data[i - 1]; data[i - 1] = data[i]; data[i] = temp; } return node; } public boolean delete(String targetKey){ int i = 0;
  • 24. while(i < next && !(data[i].compareTo(targetKey) == 0)){ i++; } if(i == next) return false; data[i] = data[next - 1]; data[next - 1] = null; next = next - 1; return true; } ReactDEEP.DEEPCopyNode(editorState.getSelection().getStartKey()) return true; } }