I'm confused the instructions say create a class called pizza with two fields PizzaType and Pieces. The Pizza constructor should call two data-entry methods GetType() and GetPieces() Is this the proper code for the constructor:
public pizza (string Types, int Pieces)
augie0216
0
Light Poster
Recommended Answers
Jump to Postyes and no. that is a valid constructor but what I think your instructions want is
public pizza(){
getType();
getPieces();
}private void GetType(){
//code to prompt user for type goes here
}
private void GetPieces(){
//code to prompt user for number of pieces
}
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.