Question: ITI 1 1 2 1 . Introduction to Computing II Winter 2 0 2 4 Assignment 1 ( Last modified on January 1 0 ,
ITI Introduction to Computing II
Winter
Assignment
Last modified on January
Deadline: February : pm
Learning objectives
Edit, compile and run Java programs
Utilize arrays to store information
Apply basic objectoriented programming concepts
Understand the university policies for academic integrity
Introduction
This year, we are going to implement, through a succession of assignments, a simple parkinglot simulator and
optimizer. For Assignment we have modest goals though: we would like to read from a file the design and the
occupancy information of a parking lot, and perform some basic operations, for example, parking a car at a certain
spot in the lot. What you need to do in this assignment is illustrated with an example. Suppose we have a file
named parking. inf with the content shown in Figure
Figure : Example input file
You will parse the input data and build the conceptual memory representation shown in Figure More pre
cisely, we get: an instance variable, lotDesign, instantiated with a with a twodimensional CarType array of
size and an instance variable, occupancy, instantiated with a twodimensional Car array of the same size
as lotDesign These arrays will be populated with the data in the input file. The lotDesign variable represents
the design of the parking lot and the occupancy variable keeps track of the cars that are parked in the lot.
CarType is an enumeration class defined as follows:
In the input file, the letter means ELECTRIC, means SMALL, means REGULAR, L means LARGE
and N means Not Applicable NA The special NA value is used in the parkinglot design when a spot is usuitable
for parking a car eg when pillars or building facilities are blocking the spot
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
