Object Oriented
Presentation
Presenters
• Waleed
• Muhammad Bilal
Mini Computer
Project
Projects application
• Calculator
• Tick toc tack
• Notepad
Mini Computer Code
Main Class
• Used loop for continuous choices and switch for user input, and on every
switch case called its specific class by creating its object and calling the
constructor
Calculator
• A calculator is a small, portable, often inexpensive electronic device that is
used to perform both basic and complex operation of arithmetic.
• Everything was created in three separate methods start, main, calculation and
it was all called in the constructor so when the object of this class will be
created and the constructor is called the other methods will also start
working and calculator will work.
To develop an simple calculator using Java
which provides :
• Simple arithmetic operation.
• The operation performed are
• Addition.
• Subtraction.
• Multiplication.
• Division.
Methods
• First of all I make a layout how I want my calculator to look like:
• As soon as layout completes I started coding and using Java swing I make the
layout of the calculator.
• Now continuing further I had to make sure that all keys are correctly
performing operation on he screen.
• As soon as coding gets completed I run & debug mine code and wow great
calculator start working.
Constructor
Users Input
Output
• By giving the value with the operator…
Tick Tac Toe
• This is an exclusive game which is named as “TIC TAC TOE”.
• It is pretty interesting for two players (user Vs. Computer).
• This game is designed by Matrix [3][3].
• The Program will allow a human user to play against the computer.
Constructor
playerInput()
Board()
Output
• Player 1 and Player 2 turns and Player 1 won…
Notepad
• Used hash map for the name and text string required in this class, stored two
variables in hash map, first one was the key as the name of the notepad file
and second one was the text string, so when ever we write the key of that file
it will perform all action like hashmap.get for loading the file and
hashmap.remove for deleting the file
Notepad()
Output
THANK YOU

Mini Computer Project

  • 1.
  • 2.
  • 3.
    Projects application • Calculator •Tick toc tack • Notepad
  • 4.
  • 5.
    Main Class • Usedloop for continuous choices and switch for user input, and on every switch case called its specific class by creating its object and calling the constructor
  • 6.
    Calculator • A calculatoris a small, portable, often inexpensive electronic device that is used to perform both basic and complex operation of arithmetic. • Everything was created in three separate methods start, main, calculation and it was all called in the constructor so when the object of this class will be created and the constructor is called the other methods will also start working and calculator will work.
  • 7.
    To develop ansimple calculator using Java which provides : • Simple arithmetic operation. • The operation performed are • Addition. • Subtraction. • Multiplication. • Division.
  • 8.
    Methods • First ofall I make a layout how I want my calculator to look like: • As soon as layout completes I started coding and using Java swing I make the layout of the calculator. • Now continuing further I had to make sure that all keys are correctly performing operation on he screen. • As soon as coding gets completed I run & debug mine code and wow great calculator start working.
  • 9.
  • 10.
  • 11.
    Output • By givingthe value with the operator…
  • 12.
    Tick Tac Toe •This is an exclusive game which is named as “TIC TAC TOE”. • It is pretty interesting for two players (user Vs. Computer). • This game is designed by Matrix [3][3]. • The Program will allow a human user to play against the computer.
  • 13.
  • 14.
  • 15.
  • 16.
    Output • Player 1and Player 2 turns and Player 1 won…
  • 17.
    Notepad • Used hashmap for the name and text string required in this class, stored two variables in hash map, first one was the key as the name of the notepad file and second one was the text string, so when ever we write the key of that file it will perform all action like hashmap.get for loading the file and hashmap.remove for deleting the file
  • 18.
  • 19.
  • 20.