Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7593619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:12:53+00:00 2026-05-30T21:12:53+00:00

I need to preface this with I am not allowed to use an IDE

  • 0

I need to preface this with I am not allowed to use an IDE in class, I must use TextPad to compile and run. Any help would be greatly appreciated.

There are three files, a driver file and two other class files. The Lab4 file is the driver file and the class files are “ITEM” and “NAME”.

I am getting the following errors when I compile the driver “Lab4” file.

     F:\Java\Lab 4A\Lab4.java:86: error: cannot find symbol
        System.out.println ("Manufacturer's Name: " + item.manName());
                                                      ^
      symbol:   method manName()
      location: variable item of type Item

The code for the “Lab4” file is here:

    import java.util.Scanner;

    public class Lab4
    {
     public static void main (String[] args)
    {
          String firstName = "";
          String lastName = "";
          String manName = "";
          float cost = 0.00f;
          int itemNum = 0;


        // Instantiate class files
        // Variables are declared because variables are expected in name.java file
        Name name = new Name("Bob", "Jones");
        Item item = new Item(985534, 9.99f, "Lewis Mfg");


        // Create a scanner
        Scanner input = new Scanner(System.in);


        // Recieve user input for variables
        System.out.println ("Please enter the customer's first name: ");
        firstName = input.next();
        while (firstName.length() < 1)
            {
            System.out.println ("Enter a valid first name");
            firstName = input.next();
            }
            name.setfirstName(firstName);
            firstName = "";

        System.out.println ("Please enter the customer's last name: ");
        lastName = input.next();
        while (lastName.length() < 1)
            {
            System.out.println ("Enter a valid last name: ");
            lastName = input.next();
            }
            name.setlastName(lastName);
            lastName = "";

        System.out.println ("Please enter the item number: ");
        itemNum = input.nextInt();
        while (itemNum < 1)
            {
            System.out.println ("Enter a valid item number: ");
            itemNum = input.nextInt();
            }
            item.setitemNum(itemNum);
            itemNum = 0;

        System.out.println ("Please enter the item's cost (including decimal): ");
        cost = input.nextFloat();
        while (cost < 1)
            {
            System.out.println ("Enter a valid cost amount: ");
            cost = input.nextFloat();
            }
        item.setcost(cost);
            cost = 0;

        System.out.println ("Please enter the manufacturer's name: ");
        manName = input.next();
        while (manName.length() < 1)
            {
            System.out.println ("Enter a valid manufacturer's name");
            manName = input.next();
            }
            item.setmanName(manName);
            manName = "";


        // Outputs the data entered by the user and stored in the other classes,               Name and Item
           System.out.println ("First Name: " + name.getfirstName() + "\n");
           System.out.println ("Last Name: " + name.getlastName() + "\n");
           System.out.println ("Item Number: " + item.getitemNum() + "\n");
       System.out.println ("Item Cost: " + item.getcost() + "\n");
       System.out.println ("Manufacturer's Name: " + item.manName());

        System.out.println ("\n\nThe customer and item information have been          entered.\n");

     }
     }

The code for the “ITEM” file that is referenced in the error is here:

     public class Item
{
    // Create private variables that cannot be accessed directly
     private int itemNum;
     private float cost;
     private String manName;

     // Create instances of the private variables that can be set by the methods
     public Item (int itemNum, float cost, String manName)
            {
            this.itemNum = itemNum;
            this.cost = cost;
        this.manName = manName;
        }

    // Gets the variable values from the user via the driver class
    public int getitemNum()
        {
        return itemNum;
        }

    public float getcost()
        {
        return cost;
        }

    public String getmanName()
        {
        return manName;
        }


    // Sets the variable amounts into the private variables after validating the input     form
    public boolean setitemNum(int itemNum)
        {
        if (itemNum < 0)
        return false;
        else
        this.itemNum = itemNum;
        return true;
        }

    public boolean setcost(float cost)
        {
        if (cost < 0)
        return false;
        else
        this.cost = cost;
        return true;
        }

    public boolean setmanName(String manName)
        {
        if (manName.length() < 0)
        return false;
        else
            this.manName = manName;
        return true;
        }
    }

Any help would be awesome!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T21:12:55+00:00Added an answer on May 30, 2026 at 9:12 pm

    You named your method getmanName(), but called manName() on the error line.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to preface this with I am not allowed to use an IDE
I need to preface this with I am not allowed to use an IDE
I need to preface this with we are not allowed to use IDE's in
I need to preface this with I am not allowed to use an IDE
I need to preface this with my instructor doesn't let us use IDE's. We
Preface: I'm not sure what resources are. I need this form (which is working
Let me preface this by saying this is not an actual situation of mine
I'd like to preface this by stating that this is for a class, so
Preface: This has become a quite a long post. While I'm not new to
To preface this, I'm not familiar with OLAP at all, so if the terminology

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.