Question

I need some help with programming this assignment.Programming Assignment 6: A Python Class, Attributes, Methods, and Objects Obiectives .Be able to write a Python class Be ablProgramming Assignment 6: A Python Class, Attributes, Methods, and Objects Rotate the image clockwise and counter-clockwise b

Programming Assignment 6: A Python Class, Attributes, Methods, and Objects Obiectives .Be able to write a Python class Be able to define class attributes Be able to define class methods .Be able to process input from a text file .Be able to write an application using objects The goal of this programming assignment is to develop a simple image processing application. The application will import a class that creates image objects with attributes and methods. The application should allow end users to issue menu commands that manipulate an image. An L shape image is given and the manipulation requirements are as follows No manipu lation, print the image on the screen Flip the image vertically and print on the screen Flip the image horizontally and print on the screen Create a "negative" of the image and print on the screen Page 1 of 2
Programming Assignment 6: A Python Class, Attributes, Methods, and Objects Rotate the image clockwise and counter-clockwise by 90 degrees; print each on the screen ion 1. Data Files: The data for this project is provided in two files, one with an L shape the other with an asymmetric shape. They are posted in Blackboard. The image is digitally coded such that it is a representation where a zero (0) character in the file should be represented with an_(underscore), to represent a blank (single space), when printed on the computer screen. Also, a one (1) character should be represented on the screen with an asterisk when the print function is called 2. Design: Create a UML diagram for the class so that an image can be manipulated. 3. Design: Create an algorithm for the application that an end user can interact with. The application should allow the user to complete all manipulations as noted above 4. Write: Create source code for the class and application. For example, there may be an image.py class file where most of the work will be done. There also should be a program image processing app.py source code file that will use the methods from the Image class and engage the end user Write a class that reads the image from a text file and converts the digital representation to one that uses underscores and asterisks Create methods to print, flip, rotate, and negate the image stored. The print method should take a String parameter which is displayed as a message above the image. It may be prudent to develop algorithms for each method. For flip and rotate, use a parameter variable to indicate the choice of directions. Flip horizontally or vertically. Rotate clockwise or counter-clockwise. Call each image manipulation method from main followed by the print function with the appropriate title as the message. Remember, in the final application this is derived from the user's menu selection. a. b. c. d. 5. Correct: Fix any syntax, logic, or run-time Python program errors. 6. Test: Using the given image file "16X16L.txt" and the file "16X16Asymmetric.txt" to test the application for errors. That is, the solution should be able to manipulate both image files correctly Output be certain the application indicates proper results to the user Submit the following: 7. 8. a. Python source code files i. Class source code 11. Application source code b. Word document with the following i. UML diagram of class; ii. Algorithm of application; iii. Source code for class and application; and iv. Screen output of execution Page 2 of2
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1.

for i in range(8):
if i<6:
print('**')
else:
print('*****')

2.

for i in range(8):
if i<2:
print('*****')
else:
print('**')

3.

for i in range(8):
if i<6:
print(' **')
else:
print('*****')

4.

for i in range(15):
if i<4:
print('****************')
elif i>3 and i<10:
print('**** **********')
elif i>9 and i<12:
print('**** *******')
else:
print('****************')

5.

for i in range(5):
if i<2:
print('********')
else:
print('**')


Add a comment
Know the answer?
Add Answer to:
Programming Assignment 6: A Python Class, Attributes, Methods, and Objects Obiectives .Be able to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a Python class, Circle, constructed by a radius and two methods which will compute the...

    Write a Python class, Circle, constructed by a radius and two methods which will compute the area and the perimeter of a circle. Include the constructor and other required methods to set and get class attributes. Create instances of Circle and test all the associated methods. Write a Python class, Rectangle, constructed by length and width and a method which will compute the area of a rectangle. Include the constructor and other required methods to set and get class attributes....

  • Final PYTHON program: Create a home inventory class that will be used by a National Builder...

    Final PYTHON program: Create a home inventory class that will be used by a National Builder to maintain inventory of available houses in the country. The following attributes should be present in your home class: -private int squarefeet -private string address -private string city -private string state -private int zipcode -private string Modelname -private string salestatus (sold, available, under contract) Your program should have appropriate methods such as: -constructor -add a new home -remove a home -update home attributes At...

  • Please use python Programming Language: Select one of the following topics: Band Character Account Create a...

    Please use python Programming Language: Select one of the following topics: Band Character Account Create a class based on your chosen topic. Make sure to include at least four attributes of varying types, a constructor, getters/setters for each attribute w/input validation, a toString, a static attribute, and a static method. Then, create a function (outside of your class) that connects to a text file which should contain the attributes of several objects. Read the data from the file, use the...

  • Your mission in this programming assignment is to create a Python program that will take an...

    Your mission in this programming assignment is to create a Python program that will take an input file, determine if the contents of the file contain email addresses and/or phone numbers, create an output file with any found email addresses and phone numbers, and then create an archive with the output file as its contents.   Tasks Your program is to accomplish the following: ‐ Welcome the user to the program ‐ Prompt for and get an input filename, a .txt...

  • Assignment Requirements I have also attached a Class Diagram that describes the hierarchy of the inheritance...

    Assignment Requirements I have also attached a Class Diagram that describes the hierarchy of the inheritance and interface behaviors . The link to the PDF of the diagram is below MotorVehical.pdf Minimize File Preview User Define Object Assignment: Create a Intellij Project. The Intellij project will contain three user defined classes. The project will test two of the User Define Classes by using the invoking each of their methods and printing the results. You are required to create three UML...

  • M01 PA C++ Classes and Objects INTRODUCTION: Write a C++ program that implements and utilizes a...

    M01 PA C++ Classes and Objects INTRODUCTION: Write a C++ program that implements and utilizes a Stereo Receiver Class/Object. INCLUDE IN YOUR ASSIGNMENT At the top of each of your C++ programs, you should have at least four lines of documentation: Program name (the C++ file name(s)), Author (your name), Date last updated, and Purpose (a brief description of what the program accomplishes). Here is an example: // Program name: tictactoe.cpp // Author: Rainbow Dash // Date last updated: 5/26/2016...

  • python code? 1. Create a class called Person that has 4 attributes, the name, the age,...

    python code? 1. Create a class called Person that has 4 attributes, the name, the age, the weight and the height [5 points] 2. Write 3 methods for this class with the following specifications. a. A constructor for the class which initializes the attributes [2.5 points] b. Displays information about the Person (attributes) [2.5 points] c. Takes a parameter Xage and returns true if the age of the person is older than Xage, false otherwise [5 points] 3. Create another...

  • Create a java project and create Student class. This class should have the following attributes, name...

    Create a java project and create Student class. This class should have the following attributes, name : String age : int id : String gender : String gpa : double and toString() method that returns the Student's detail. Your project should contain a TestStudent class where you get the student's info from user , create student's objects and save them in an arralist. You should save at least 10 student objects in this arraylist using loop statement. Then iterate through...

  • *Python* INTRODUCTION: The goal of this programming assignment is to enable the student to practice object-oriented...

    *Python* INTRODUCTION: The goal of this programming assignment is to enable the student to practice object-oriented programming using classes to create objects. PROBLEM DEFINITION: Write a class named Employee that holds the following data about an employee in attributes: name, IDnumber, department, jobTitle The class should have 8 methods as follows:  For each attribute, there should be a method that takes a parameter to be assigned to the attribute. This is known as a mutator method.  For each...

  • 1) Using the Object-Oriented Programming Paradigm,implement the necessary code in Python creating a ‘Car’ class with...

    1) Using the Object-Oriented Programming Paradigm,implement the necessary code in Python creating a ‘Car’ class with a constructor that stores all the Car information (ID, MAKE, MODEL, YEAR , COLOR, MILEAGE, PRICE_TO_DEALER, SALE_PRICE, PROFIT) as attributes. 2) Implement and add the following methods to the ‘Car' class in Question 1. a) necessary getter methods b) necessary setter methods c) method to display all the information to the screen d) a method to calculate the profit

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT