Question: Task Write a JAVA program that reads the height of a triangle ( less than 1 0 ) from the user and then calls two
Task
Write a JAVA program that reads the height of a triangle less than from the user and then calls two void methods named plotTri and plotTriEach of the methods should have a parameter for the height of the triangle and use printf inside of nested For loops to produce the output of the respective triangle for the user. Note that the numbers in the triangle are leftaligned.
Create a project and class named HWFirstnameLastname in NetBeans using your actual first and last names to hold your program.
For height plotTri and plotTri will print the following triangles respectively.
Additional Assignment Requirements
You MUST use nested For loops in each method in this assignment.
You MUST use printf to produce the output in this assignment.
You may NOT use Java libraries or programming concepts not yet learned in this course. This assignment is designed to assess that you understand the concepts being presented in the course this week, not concepts we will learn at a later time.
You may NOT discuss this problem with your classmates. This assignment is independent work. Work copied from another student or an online resource will result in enforcement of EKU's Academic Integrity policy as discussed in the syllabus.
You must use appropriate spacing, indention, naming conventions, and documentation in your Java program.
You will upload your completed work by attaching your HWFirstnameLastname.java to your submission in
Blackboard for the lab assignment. If you need help locating your java file to submit, refer to the FAQ discussion board for help or reach out to your lab assistantinstructor for help. DO NOT submit the entire project folder to be graded!
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
